Documentation ¶
Index ¶
- func Debug(args ...interface{})
- func Debugf(format string, args ...interface{})
- func Debugln(args ...interface{})
- func Error(args ...interface{})
- func Errorf(format string, args ...interface{})
- func Errorln(args ...interface{})
- func Fatalf(format string, args ...interface{})
- func Fatalln(args ...interface{})
- func Info(args ...interface{})
- func Infof(format string, args ...interface{})
- func Infoln(args ...interface{})
- func Init(c Config) error
- func Warn(args ...interface{})
- func Warnf(format string, args ...interface{})
- func Warnln(args ...interface{})
- func WithError(err error) *logrus.Entry
- func WithFields(vs ...string) *logrus.Entry
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithError ¶
WithError adds an error as single field (using the key defined in ErrorKey) to the Entry.
func WithFields ¶
WithFields adds a map of fields to the Entry.
Types ¶
type Config ¶
type Config struct { Module string `yaml:"module" json:"module"` Path string `yaml:"path" json:"path"` Level string `yaml:"level" json:"level" default:"info" validate:"regexp=^(info|debug|warn|error)$"` Format string `yaml:"format" json:"format" default:"text" validate:"regexp=^(text|json)$"` Console bool `yaml:"console" json:"console" default:"false"` Age struct { Max int `yaml:"max" json:"max" default:"15" validate:"min=1"` } `yaml:"age" json:"age"` // days Size struct { Max int `yaml:"max" json:"max" default:"50" validate:"min=1"` } `yaml:"size" json:"size"` // in MB Backup struct { Max int `yaml:"max" json:"max" default:"15" validate:"min=0"` } `yaml:"backup" json:"backup"` }
Config logger config
Click to show internal directories.
Click to hide internal directories.