Documentation ¶
Index ¶
Constants ¶
View Source
const ( ISO8601 = "2006-01-02T15:04:05.000000000Z0700" TimeKey = "time" LevelKey = "level" CallerKey = "src_file" MessageKey = "message" StacktraceKey = "backtrace" CustomFieldKey = "context" SourceLineKey = "src_line" Warning = "warning" )
Variables ¶
View Source
var (
Log *zap.Logger
)
Functions ¶
func LalamoveISO8601TimeEncoder ¶
func LalamoveISO8601TimeEncoder(t time.Time, enc zapcore.PrimitiveArrayEncoder)
LalamoveISO8601TimeEncoder will convert the time to ISO8601 based on Lalamove k8s logging format
func LalamoveLevelEncoder ¶
func LalamoveLevelEncoder(l zapcore.Level, enc zapcore.PrimitiveArrayEncoder)
LalamoveLevelEncoder will convert the warn display string to warning
func Logger ¶
Logger will create a zap based logger Extra field will inside fields namespace return a *zap.Logger for logging
func NewLalamoveEncoderConfig ¶
func NewLalamoveEncoderConfig() *zapcore.EncoderConfig
NewLalamoveEncoderConfig will create an EncoderConfig
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.