Documentation
¶
Index ¶
- type Logger
- func (l *Logger) Error(ctx context.Context, msg string, err error, fields map[string]any)
- func (l *Logger) Info(ctx context.Context, msg string, fields map[string]any)
- func (l *Logger) Sugar() *zap.SugaredLogger
- func (l *Logger) SugarWith(fields ...zap.Field) *zap.SugaredLogger
- func (l *Logger) With(fields ...zap.Field) *Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
Logger wraps zap.Logger to provide a consistent interface.
func New ¶
New creates a new logger based on the provided level and service name. level: debug, info, warn, error, dpanic, panic, fatal. serviceName: name of the service for logging context.
func (*Logger) Sugar ¶
func (l *Logger) Sugar() *zap.SugaredLogger
Sugar returns a SugaredLogger for less verbose logging.
Click to show internal directories.
Click to hide internal directories.