Documentation
¶
Overview ¶
Package logger provides the Logger contract plus zap, memory, and noop implementations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Module = fx.Options( fx.Provide(newLogger), )
Module provides a Logger from a logger.Config supplied by the service.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Driver string // zap | memory | noop
Level string // debug | info | warn | error | fatal | panic
Format string // time layout for log timestamps
Path string // output path for the zap driver
Debug bool
}
Config selects and configures the logger driver.
type Logger ¶
type Logger interface {
Debug(msg string, fields ...zap.Field)
Info(msg string, fields ...zap.Field)
Warn(msg string, fields ...zap.Field)
Error(msg string, fields ...zap.Field)
}
Logger is the interface for logging messages with different levels and structured fields.
Click to show internal directories.
Click to hide internal directories.