Documentation ¶
Index ¶
Constants ¶
View Source
const ( LevelDebug = "debug" LevelInfo = "info" LevelWarn = "warn" LevelError = "error" )
View Source
const ( EncoderConsole = "console" EncoderJSON = "json" )
View Source
const ( TimeEncoderISO8601 = "iso8601" TimeEncoderMillis = "millis" TimeEncoderNanos = "nano" TimeEncoderEpoch = "epoch" TimeEncoderDefault = "default" )
Variables ¶
This section is empty.
Functions ¶
func NewSugar ¶
func NewSugar(name string) *zap.SugaredLogger
Types ¶
type ZapConfig ¶
type ZapConfig struct { Development bool `json:"development,omitempty" yaml:"development,omitempty"` Encoder string `json:"encoder,omitempty" yaml:"encoder,omitempty"` Level string `json:"level,omitempty" yaml:"level,omitempty"` StackLevel string `json:"stack_level,omitempty" yaml:"stack_level,omitempty"` Sample bool `json:"sample,omitempty" yaml:"sample,omitempty"` TimeEncoding string `json:"time_encoding,omitempty" yaml:"time_encoding,omitempty"` }
var Config ZapConfig
Click to show internal directories.
Click to hide internal directories.