log

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitLogger

func InitLogger(logpath, loglevel, maxSize string) logr.Logger

InitLogger initializes a logr.Logger with zap + lumberjack. It writes logs to both stdout (for `kubectl logs`) and a rotating file.

Parameters:

logpath  - directory for log file, default is /tmp
loglevel - log verbosity ("debug", "info", "error")
maxSize  - maximum log file size in MB before rotation

Returns:

logr.Logger compatible logger (zapr wrapper of zap)

func InitLoggerFromFlagsAndEnv added in v1.1.0

func InitLoggerFromFlagsAndEnv(logDir, logLevel, logFileMaxSize string) logr.Logger

Types

This section is empty.

Jump to

Keyboard shortcuts

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