Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FlushLogger ¶
FlushLogger writes any buffered log entries to the output. The function should be called before the program exits to ensure all logs are written.
func InitializeLogger ¶
func InitializeLogger(logLevel zap.AtomicLevel, disableCaller bool, disableStacktrace bool) *zap.Logger
InitializeLogger initializes a new zap logger with the provided log level. The logger is configured to write JSON structured logs to stdout/stderr, with timestamps in RFC3339Nano format. Log example: {"level":"info","timestamp":"2021-08-25T14:00:00.000000000Z","message":"Fishman!"}
func UpdateLogLevel ¶
func UpdateLogLevel(currentLevel zap.AtomicLevel, targetLevel string)
UpdateLogLevel changes the log level of the provided zap.AtomicLevel to the target level. If the target level string cannot be parsed, the function will silently fail.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.