Documentation ¶
Overview ¶
Package logging provides logging primitives.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var StdWriter = &logWrapper{nil}
StdWriter creates a sync writer that writes all logs to the std logger.
Functions ¶
func ZapLogger ¶
func ZapLogger(dests ...*LogDestination) *zap.Logger
ZapLogger creates new default Zap Logger.
Types ¶
type EncoderOption ¶
type EncoderOption func(config *zapcore.EncoderConfig)
EncoderOption defines a log destination encoder config setter.
func WithColoredLevels ¶
func WithColoredLevels() EncoderOption
WithColoredLevels enables log level colored output.
type LogDestination ¶
type LogDestination struct {
// contains filtered or unexported fields
}
LogDestination defines logging destination Config.
func NewLogDestination ¶
func NewLogDestination(writer io.Writer, logLevel zapcore.LevelEnabler, options ...EncoderOption) *LogDestination
NewLogDestination creates new log destination.
Click to show internal directories.
Click to hide internal directories.