Documentation
¶
Index ¶
- func Debug(msg string, args ...any)
- func Error(msg string, args ...any)
- func GetLogger() *slog.Logger
- func Info(msg string, args ...any)
- func Initialize(cfg *Config)
- func Warn(msg string, args ...any)
- func WithContext(ctx context.Context) *slog.Logger
- func WithField(key string, value any) *slog.Logger
- func WithFields(fields map[string]any) *slog.Logger
- type Config
- type LogLevel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Initialize ¶
func Initialize(cfg *Config)
Initialize sets up the logger with the given configuration
func WithContext ¶
WithContext returns a logger with context
Types ¶
type Config ¶
Config holds logging configuration
func DefaultConfig ¶
func DefaultConfig() *Config
DefaultConfig returns the default logging configuration
type LogLevel ¶
type LogLevel string
LogLevel represents logging levels
const ( // LogLevelDebug is for detailed debug information LogLevelDebug LogLevel = "debug" // LogLevelInfo is for general operational information LogLevelInfo LogLevel = "info" // LogLevelWarn is for warning conditions that should be addressed LogLevelWarn LogLevel = "warn" // LogLevelError is for error conditions that prevent normal operation LogLevelError LogLevel = "error" )
Click to show internal directories.
Click to hide internal directories.