Documentation ¶
Index ¶
- type Config
- type Zap
- func (l *Zap) DPanic(args ...interface{})
- func (l *Zap) DPanicf(template string, args ...interface{})
- func (l *Zap) DPanicw(message string, args ...interface{})
- func (l *Zap) Debug(args ...interface{})
- func (l *Zap) Debugf(template string, args ...interface{})
- func (l *Zap) Debugw(message string, args ...interface{})
- func (l *Zap) Error(args ...interface{})
- func (l *Zap) Errorf(template string, args ...interface{})
- func (l *Zap) Errorw(message string, args ...interface{})
- func (l *Zap) Fatal(args ...interface{})
- func (l *Zap) Fatalf(template string, args ...interface{})
- func (l *Zap) Fatalw(message string, args ...interface{})
- func (l *Zap) HasInitializer() bool
- func (l *Zap) Info(args ...interface{})
- func (l *Zap) Infof(template string, args ...interface{})
- func (l *Zap) Infow(message string, args ...interface{})
- func (l *Zap) Initializer() component.Initializer
- func (l *Zap) Panic(args ...interface{})
- func (l *Zap) Panicf(template string, args ...interface{})
- func (l *Zap) Panicw(message string, args ...interface{})
- func (l *Zap) Warn(args ...interface{})
- func (l *Zap) Warnf(template string, args ...interface{})
- func (l *Zap) Warnw(message string, args ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { ServiceName string `env:"SERVICE_NAME"` Dev bool `env:"LOGGER_DEV_MODE,default=true"` Level string `env:"LOGGER_LEVEL,default=debug"` Encoding string `env:"LOGGER_ENCODING,default=json"` OutputPath string `env:"LOGGER_OUTPUT_PATH,default=./data/service.log"` MaxFileSize int `env:"LOGGER_MAX_FILE_SIZE,default=10"` MaxNumBackups int `env:"LOGGER_MAX_NUM_BACKUPS,default=5"` MaxRetentionDays int `env:"LOGGER_MAX_RETENTION_DAYS,default=30"` CompressOld bool `env:"LOGGER_COMPRESS_OLD,default=true"` }
Config holds the etcd configuration
func (*Config) AtomicLevel ¶
func (c *Config) AtomicLevel() uber_zap.AtomicLevel
func (*Config) GetEncoder ¶
func (*Config) GetLogWriter ¶
func (c *Config) GetLogWriter() zapcore.WriteSyncer
func (*Config) UnmarshalEnv ¶
UnmarshalEnv env.EnvSet to Config
type Zap ¶
type Zap struct { Config *Config Logger *uber_zap.SugaredLogger }
func (*Zap) HasInitializer ¶
func (*Zap) Initializer ¶
func (l *Zap) Initializer() component.Initializer
Click to show internal directories.
Click to hide internal directories.