Documentation
¶
Index ¶
- type Config
- type Field
- func Any(key string, val any) Field
- func Bool(key string, val bool) Field
- func Error(val error) Field
- func Int32(key string, val int32) Field
- func Int64(key string, val int64) Field
- func Int64s(key string, val []int64) Field
- func String(key, val string) Field
- func Strings(key string, val []string) Field
- type Logger
- type NopLogger
- type ZapLogger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶ added in v0.5.0
type Config struct {
Mode int `yaml:"mode"`
Level string `yaml:"level"`
Filename string `yaml:"filename"`
MaxSize int `yaml:"maxSize"`
MaxBackups int `yaml:"maxBackups"`
MaxAge int `yaml:"maxAge"`
}
func (*Config) BuildConfig ¶ added in v0.5.0
type Logger ¶
type Logger interface {
Debug(msg string, args ...Field)
Info(msg string, args ...Field)
Warn(msg string, args ...Field)
Error(msg string, args ...Field)
}
func NewZapLogger ¶
Click to show internal directories.
Click to hide internal directories.