Documentation
¶
Overview ¶
Package logging contains tools for working with logging.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewZerolog ¶
func NewZerolog(cfg ZerologCfg, writer io.Writer) zerolog.Logger
NewZerolog creates instance of zerolog logger.
Types ¶
type ZerologCfg ¶
type ZerologCfg struct {
Colors bool
Pretty bool
Caller bool
LevelFieldName string
MessageFieldName string
TimeFieldName string
TimeFormat string
Level zerolog.Level
DurationUnit time.Duration
}
ZerologCfg is a params for zerolog logger instance creation.
func NewZerologCfgViper ¶
func NewZerologCfgViper(v *viper.Viper) ZerologCfg
NewZerologCfgViper creates zerolog config from viper config instance.
Click to show internal directories.
Click to hide internal directories.