logging

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package logging provides a centralized zap logger setup for the kloak project. It creates a production or development zap logger based on environment variables and bridges it to controller-runtime via zapr.

Index

Constants

View Source
const TraceLevel = zapcore.DebugLevel - 1

TraceLevel is a custom log level below Debug for very verbose output (per-secret sync, BPF debug counters, etc.). Enabled by KLOAK_LOG_LEVEL=trace.

Variables

This section is empty.

Functions

func Setup

func Setup() *zap.SugaredLogger

Setup initializes a zap logger and configures controller-runtime to use it.

Environment variables:

  • KLOAK_LOG_DEV=true: use development config (console output, colors)
  • KLOAK_LOG_LEVEL: override log level (trace, debug, info, warn, error)

Returns a *zap.SugaredLogger for use throughout the application.

func Tracew

func Tracew(log *zap.SugaredLogger, msg string, keysAndValues ...interface{})

Tracew logs at trace level (below debug). Use for very verbose output like per-secret sync details, BPF debug counters, and per-map-entry operations.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL