Documentation ¶
Index ¶
Constants ¶
View Source
const ( NoLevel = zerolog.NoLevel TraceLevel = zerolog.TraceLevel DebugLevel = zerolog.DebugLevel InfoLevel = zerolog.InfoLevel WarnLevel = zerolog.WarnLevel ErrorLevel = zerolog.ErrorLevel PanicLevel = zerolog.PanicLevel FatalLevel = zerolog.FatalLevel )
View Source
const ( LevelNo = "" LevelTrace = "TRACE" LevelDebug = "DEBUG" LevelInfo = "INFO" LevelWarn = "WARN" LevelError = "ERROR" LevelPanic = "PANIC" LevelFatal = "FATAL" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Level string `desc:"TRACE, DEBUG, INFO, WARN, ERROR, PANIC, FATAL"` Stdout bool `desc:"enable output to stdout"` Name string `desc:"Name for file. Destination file name: <name>.log"` Folder string `desc:"folder for log files"` MaxSizeMB int `desc:"max size of active log file in MB"` MaxAgeDays int `desc:"max age days of backups files"` MaxBackups int `desc:"max backups count"` Compress bool `desc:"compress backups files"` // contains filtered or unexported fields }
Config for zerolog logger
type Event ¶ added in v1.72.15
Event represents a log event. It is instanced by one of the level method of Logger and finalized by the Msg or Msgf method.
type Logger ¶ added in v1.72.15
A Logger represents an active logging object that generates lines of JSON output to an io.Writer. Each logging operation makes a single call to the Writer's Write method. There is no guarantee on access serialization to the Writer. If your Writer is not thread safe, you may consider a sync wrapper.
Click to show internal directories.
Click to hide internal directories.