Documentation
¶
Overview ¶
Package logger provides structured logging functionality for the application. It includes log initialization, configuration, and various log levels.
Package logger provides structured logging functionality for the application. It includes log initialization, configuration, and various log levels.
Index ¶
- type Logger
- func (lg Logger) Debug(msg string, keysAndValues ...any)
- func (lg Logger) Error(msg string, keysAndValues ...any)
- func (lg Logger) Fatal(msg string, keysAndValues ...any)
- func (lg Logger) Info(msg string, keysAndValues ...any)
- func (lg Logger) Sync()
- func (lg Logger) Warn(msg string, keysAndValues ...any)
- type LoggerOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func NewLogger ¶
func NewLogger(opts LoggerOptions) *Logger
NewLogger initializes the logger with given options
type LoggerOptions ¶
type LoggerOptions struct { Debug bool // Enable debug logging NoOp bool // Disable logging completely JSON bool // Use JSON format for logs Caller bool // Include caller info Stack bool // Include stack trace in debug mode EncodeTime zapcore.TimeEncoder }
LoggerOptions defines configurable parameters for the logger
func DefaultOptions ¶
func DefaultOptions() LoggerOptions
DefaultOptions returns a default logger configuration
Click to show internal directories.
Click to hide internal directories.