Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DynamicLogger ¶
DynamicLogger wraps zap.Logger with ability to switch levels at runtime
func NewDefaultLogger ¶
func NewDefaultLogger() (*DynamicLogger, error)
NewDefaultLogger creates a default logger for initial startup logging
func NewLogger ¶
func NewLogger(config configtypes.LogConfig) (*DynamicLogger, error)
NewLogger creates a new Zap logger with appropriate configuration
func NewLoggerWithStartupOverride ¶
func NewLoggerWithStartupOverride(config configtypes.LogConfig) (*DynamicLogger, error)
NewLoggerWithStartupOverride creates a logger that starts at INFO level if configured level is higher, then can be switched to configured level using SwitchToConfiguredLevel()
func (*DynamicLogger) EnsureInfoLevelForShutdown ¶
func (dl *DynamicLogger) EnsureInfoLevelForShutdown()
EnsureInfoLevelForShutdown ensures both console and file loggers are at INFO level to guarantee visibility of shutdown sequence logs
func (*DynamicLogger) SwitchToConfiguredLevel ¶
func (dl *DynamicLogger) SwitchToConfiguredLevel()
SwitchToConfiguredLevel switches logger to the originally configured level
Click to show internal directories.
Click to hide internal directories.