Documentation
¶
Overview ¶
Package logx wraps structured logging setup and logger configuration.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Level is the minimum log level (debug, info, warn, error, fatal).
Level string
// Format is the log output format: "json" (default/production) or "text" (dev console).
Format string
}
Config holds logger configuration. Populated from the application config.
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger wraps zerolog.Logger to provide a minimal structured logging abstraction for core runtime paths. Modules and middleware receive a *Logger via dependency injection — no global singleton.
func New ¶
New creates a production-ready Logger from the given Config. It returns an error if the config contains an invalid log level.
func NewWithWriter ¶
NewWithWriter creates a logger writing to the provided writer.
Click to show internal directories.
Click to hide internal directories.