Documentation ¶
Overview ¶
Package zaputil implements utilities for zap.
Index ¶
- func NewColortextEncoder() zapcore.Encoder
- func NewJSONEncoder() zapcore.Encoder
- func NewLogger(writer io.Writer, level zapcore.Level, encoder zapcore.Encoder) *zap.Logger
- func NewLoggerForFlagValues(writer io.Writer, levelString string, format string) (*zap.Logger, error)
- func NewTextEncoder() zapcore.Encoder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewColortextEncoder ¶
NewColortextEncoder returns a new colortext Encoder.
func NewJSONEncoder ¶
NewJSONEncoder returns a new JSON encoder.
func NewLoggerForFlagValues ¶ added in v1.32.0
func NewLoggerForFlagValues(writer io.Writer, levelString string, format string) (*zap.Logger, error)
NewLoggerForFlagValues returns a new Logger for the given level and format strings.
The level can be [debug,info,warn,error]. The default is info. The format can be [text,color,json]. The default is color.
func NewTextEncoder ¶
NewTextEncoder returns a new text Encoder.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.