// NewProductionLogger returns a configured logger for production.
// It outputs info level and above logs with sampling.
NewProductionLogger returns a configured logger for production.
It outputs info level and above logs with sampling.
// NewProductionLogger returns a configured logger for production . // It outputs info level and above logs with sampling .
func NewProductionLogger() *Logger {
	logLevel := zerolog.InfoLevel
	zerolog.SetGlobalLevel(logLevel)
	zerolog.LevelFieldName = "severity"
	zerolog.LevelFieldMarshalFunc = func(l zerolog.Level) string {
		return logLevelSeverity[l]
	}
	zerolog.TimestampFieldName = "time"
	zerolog.TimeFieldFormat = time.RFC3339Nano
	sampler := &zerolog.BasicSampler{N: 1}
	logger := zerolog.New(os.Stderr).Sample(sampler).With().Timestamp().Logger()
	return &Logger{&logger}
}
func NewProductionLogger ( ) * Logger { logLevel := zerolog . InfoLevel zerolog . SetGlobalLevel ( logLevel ) zerolog . LevelFieldName = " " zerolog . LevelFieldMarshalFunc = func ( l zerolog . Level ) string { return logLevelSeverity [ l ] } zerolog . TimestampFieldName = " " zerolog . TimeFieldFormat = time . RFC3339Nano sampler := & zerolog . BasicSampler { N : 1 } logger := zerolog . New ( os . Stderr ) . Sample ( sampler ) . With ( ) . Timestamp ( ) . Logger ( ) return & Logger { & logger } }
NewProductionLogger returns a configured logger for production.
NewProductionLogger returns a configured logger for production .
// default sampler