Documentation ¶
Overview ¶
Package loggerzap is a thin wrapper around go.uber.org/zap that implements logger.Logger.
Index ¶
- func New(config Config) logger.Logger
- type Config
- type Encoding
- type ZapLogger
- func (z ZapLogger) Debug(msg string)
- func (z ZapLogger) Debugf(format string, a any)
- func (z ZapLogger) Error(msg string)
- func (z ZapLogger) Errorf(format string, a any)
- func (z ZapLogger) Fatal(msg string)
- func (z ZapLogger) Fatalf(format string, a any)
- func (z ZapLogger) GetLevel() logger.Level
- func (z ZapLogger) Info(msg string)
- func (z ZapLogger) Infof(format string, a any)
- func (z ZapLogger) Panic(msg string)
- func (z ZapLogger) Panicf(format string, a any)
- func (z ZapLogger) Sync()
- func (z ZapLogger) Warn(msg string)
- func (z ZapLogger) Warnf(format string, a any)
- func (z ZapLogger) WithField(key string, val any) logger.Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Env logger.Environment Level logger.Level Encoding Encoding MessageKey string }
Config data
func NewProdConfig ¶
func NewProdConfig() Config
NewProdConfig creates a reasonable production config
func (Config) GetEnvironment ¶
func (c Config) GetEnvironment() logger.Environment
Click to show internal directories.
Click to hide internal directories.