Documentation ¶
Overview ¶
Package color adds coloring functionality for TTY output.
Index ¶
- Constants
- func NewDevelopmentEncoder(options ...DevEncoderOption) func(zapcore.EncoderConfig) (zapcore.Encoder, error)
- func NewEncoder(specialKeys []string) func(zapcore.EncoderConfig) (zapcore.Encoder, error)
- func NewLogger(zapLogger *zap.Logger, ctxLogger log.ContextMapper) log.Logger
- type Color
- type DevEncoderOption
- type DevEncoderOptions
- type Encoder
Constants ¶
View Source
const DevEncoderType = "dliver-dev"
View Source
const (
EncoderType = "dliver"
)
Variables ¶
This section is empty.
Functions ¶
func NewDevelopmentEncoder ¶
func NewDevelopmentEncoder(options ...DevEncoderOption) func(zapcore.EncoderConfig) (zapcore.Encoder, error)
NewDevelopmentEncoder create a new zapcore.Encoder configured for development.
func NewEncoder ¶
NewEncoder create a new zapcore.Encoder configured for the dliver system needs. During encoding field names matching a specialKeys entry will be added to the log message separately from the other fields. Special field keys and values may not include ';' and '='. These characters will be replaced with empty string.
Types ¶
type DevEncoderOption ¶
type DevEncoderOption func(de *DevEncoderOptions)
func ExcludeFilter ¶
func ExcludeFilter(filters ...string) DevEncoderOption
func IndentFields ¶
func IndentFields(indent bool) DevEncoderOption
func TimeLayout ¶
func TimeLayout(layout string) DevEncoderOption
type DevEncoderOptions ¶
type DevEncoderOptions struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.