Documentation ¶
Index ¶
- func Debug(format string, a ...interface{})
- func Error(format string, a ...interface{})
- func Fatal(format string, a ...interface{})
- func Info(format string, a ...interface{})
- func InitDefaultLogger()
- func IsDebugLevel() bool
- func Level() zerolog.Level
- func Panic(format string, a ...interface{})
- func SetFlag(f *flag.FlagSet)
- func Warn(format string, a ...interface{})
- type AfterErrorConfiguration
- type Logger
- func (logger *Logger) Debug(format string, a ...interface{})
- func (logger *Logger) Error(format string, a ...interface{})
- func (logger *Logger) Fatal(format string, a ...interface{})
- func (logger *Logger) GetLevel() string
- func (logger *Logger) Info(format string, a ...interface{})
- func (logger *Logger) Panic(format string, a ...interface{})
- func (logger *Logger) RawJson(key string, raw []byte, format string, a ...interface{})
- func (logger *Logger) Sample(max uint32, period time.Duration) *Logger
- func (logger *Logger) SubLogger(name string) *Logger
- func (logger *Logger) Warn(format string, a ...interface{})
- type LoggerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitDefaultLogger ¶
func InitDefaultLogger()
func IsDebugLevel ¶ added in v1.2.0
func IsDebugLevel() bool
Types ¶
type AfterErrorConfiguration ¶ added in v1.5.0
type AfterErrorConfiguration struct {
Additions map[string]interface{} `yaml:"additions,omitempty"`
}
var ( AfterError spi.AfterError AfterErrorConfig AfterErrorConfiguration )
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func NewLogger ¶
func NewLogger(config *LoggerConfig) *Logger
type LoggerConfig ¶
type LoggerConfig struct { Level string `yaml:"level,omitempty"` JsonFormat bool `yaml:"jsonFormat,omitempty"` EnableStdout bool `yaml:"enableStdout,omitempty"` EnableFile bool `yaml:"enableFile,omitempty"` Directory string `yaml:"directory,omitempty"` Filename string `yaml:"filename,omitempty"` MaxSize int `yaml:"maxSize,omitempty"` MaxBackups int `yaml:"maxBackups,omitempty"` MaxAge int `yaml:"maxAge,omitempty"` TimeFormat string `yaml:"timeFormat,omitempty"` CallerSkipCount int `yaml:"callerSkipCount,omitempty"` NoColor bool `yaml:"noColor,omitempty"` }
Click to show internal directories.
Click to hide internal directories.