Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = zapcore.EncoderConfig{ TimeKey: "ts", LevelKey: "level", NameKey: "logger", CallerKey: "caller", MessageKey: "message", StacktraceKey: "stacktrace", LineEnding: zapcore.DefaultLineEnding, EncodeLevel: zapcore.LowercaseLevelEncoder, EncodeTime: LogzTimeEncoder, EncodeDuration: zapcore.SecondsDurationEncoder, EncodeCaller: zapcore.ShortCallerEncoder, }
DefaultConfig - Message needs to be the message key for logzio
Functions ¶
func LogzTimeEncoder ¶
func LogzTimeEncoder(t time.Time, enc zapcore.PrimitiveArrayEncoder)
LogzTimeEncoder format to time.RFC3339Nano
Types ¶
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
An Option configures a Logger.
func SetEncodeConfig ¶
func SetEncodeConfig(c zapcore.EncoderConfig) Option
SetEncodeConfig set the encoder
Click to show internal directories.
Click to hide internal directories.