Documentation ¶
Index ¶
Constants ¶
View Source
const ( // FileModeAppend will append to existing log files between restarts. // This is the default option. FileModeAppend FileMode = "append" // FileModeTruncate will truncate onto existing log files in between // restarts. FileModeTruncate = "truncate" // FileModeRotate will enable log rotation for log files. FileModeRotate = "rotate" )
View Source
const ( TypeFile Type = "file" TypeWaterfall = "waterfall" TypeTee = "tee" )
Variables ¶
This section is empty.
Functions ¶
func NewWaterfall ¶ added in v0.9.0
NewWaterfall creates a new core that distributes logs to the underlying cores in a waterfall pattern; for each log entry the core will iterate through each core, in order, stopping when it finds a core that will accept the log entry.
Types ¶
type Config ¶
type Config struct { Path string `yaml:"path"` // If Path is a file, Mode will determine how the log file is managed. // FileModeAppend is the default if value is undefined. Mode FileMode `yaml:"mode,omitempty"` Name string `yaml:"name"` Level zapcore.Level `yaml:"level"` // Type specifies how log entries are handled. If Type is Waterfall or Tee // this will distribute log entries to child loggers; fields Mode, Name, // and Level will be ignored. If the value is Sink or empty the Children // field will be ignored. Type Type `yaml:"type,omitempty"` // Specifies underlying children loggers. Only applicable when Type is // TypeWaterfall or TypeTee. Children []Config `yaml:"children,omitempty"` }
Click to show internal directories.
Click to hide internal directories.