Versions in this module Expand all Collapse all v1 v1.0.0 Aug 13, 2023 Changes in this version + const DPanicLevel + const DebugLevel + const DefaultFieldName + const ErrorLevel + const FatalLevel + const InfoLevel + const PanicLevel + const WarnLevel + var DefaultRotateLoggerConfig = &Config + var DefaultZapLogger = newZapLogger(defaultConfig, os.Stdout, os.Stderr, true) + func AtLevel(level zapcore.Level, msg string, fields ...zapcore.Field) + func Configure(config Config) error + func ConsoleLogTimeEncoder(t time.Time, enc zapcore.PrimitiveArrayEncoder) + func ContextWithCustomizedLogger(ctx context.Context, logEntry *LogEntry) context.Context + func ContextWithLogger(ctx context.Context) context.Context + func DPanic(msg string) + func DPanicWith(msg string, fields Fields) + func DPanicf(template string, args ...interface{}) + func DPanicv(msg string, fields ...zapcore.Field) + func DPanicw(msg string, keysAndValues ...interface{}) + func Debug(msg string) + func DebugWith(msg string, fields Fields) + func Debugf(template string, args ...interface{}) + func Debugv(msg string, fields ...zapcore.Field) + func Debugw(msg string, keysAndValues ...interface{}) + func DeclareLogger(config Config, logv func(msg string, fields ...zapcore.Field)) + func Error(msg string) + func ErrorWith(msg string, fields Fields) + func Errorf(template string, args ...interface{}) + func Errorv(msg string, fields ...zapcore.Field) + func Errorw(msg string, keysAndValues ...interface{}) + func Fatal(msg string) + func FatalWith(msg string, fields Fields) + func Fatalf(template string, args ...interface{}) + func Fatalv(msg string, fields ...zapcore.Field) + func Fatalw(msg string, keysAndValues ...interface{}) + func Info(msg string) + func InfoWith(msg string, fields Fields) + func Infof(template string, args ...interface{}) + func Infov(msg string, fields ...zapcore.Field) + func Infow(msg string, keysAndValues ...interface{}) + func Panic(msg string) + func PanicWith(msg string, fields Fields) + func Panicf(template string, args ...interface{}) + func Panicv(msg string, fields ...zapcore.Field) + func Panicw(msg string, keysAndValues ...interface{}) + func SetLevel(l Level) + func ShortTimeEncoder(t time.Time, enc zapcore.PrimitiveArrayEncoder) + func Warn(msg string) + func WarnWith(msg string, fields Fields) + func Warnf(template string, args ...interface{}) + func Warnv(msg string, fields ...zapcore.Field) + func Warnw(msg string, keysAndValues ...interface{}) + type Config struct + CallerEnabled bool + CallerSkip int + ConsoleErrorStream *os.File + ConsoleInfoStream *os.File + ConsoleLoggingEnabled bool + ConsoleSeparator string + Directory string + EncodeLogsAsJson bool + FileLoggingEnabled bool + Filename string + Level zapcore.Level + LevelEncoder zapcore.LevelEncoder + MaxAge int + MaxBackups int + MaxSize int + type Fields map[string]interface + type Level = zapcore.Level + func GetLevel() Level + type LogEntry struct + func FromContext(ctx context.Context) *LogEntry + func NewLogEntry(config Config) *LogEntry + func With(data string) *LogEntry + func WithField(k, v string) *LogEntry + func WithFields(fields Fields) *LogEntry + func (le *LogEntry) ContextWithLogger(ctx context.Context) context.Context + func (le *LogEntry) DPanic(msg string) + func (le *LogEntry) DPanicWith(msg string, fields Fields) + func (le *LogEntry) DPanicf(template string, args ...interface{}) + func (le *LogEntry) DPanicln(args ...interface{}) + func (le *LogEntry) DPanicv(msg string, fields ...zapcore.Field) + func (le *LogEntry) DPanicw(msg string, keysAndValues ...interface{}) + func (le *LogEntry) Debug(msg string) + func (le *LogEntry) DebugWith(msg string, fields Fields) + func (le *LogEntry) Debugf(template string, args ...interface{}) + func (le *LogEntry) Debugln(args ...interface{}) + func (le *LogEntry) Debugv(msg string, fields ...zapcore.Field) + func (le *LogEntry) Debugw(msg string, keysAndValues ...interface{}) + func (le *LogEntry) Error(msg string) + func (le *LogEntry) ErrorWith(msg string, fields Fields) + func (le *LogEntry) Errorf(template string, args ...interface{}) + func (le *LogEntry) Errorln(args ...interface{}) + func (le *LogEntry) Errorv(msg string, fields ...zapcore.Field) + func (le *LogEntry) Errorw(msg string, keysAndValues ...interface{}) + func (le *LogEntry) Fatal(msg string) + func (le *LogEntry) FatalWith(msg string, fields Fields) + func (le *LogEntry) Fatalf(template string, args ...interface{}) + func (le *LogEntry) Fatalln(args ...interface{}) + func (le *LogEntry) Fatalv(msg string, fields ...zapcore.Field) + func (le *LogEntry) Fatalw(msg string, keysAndValues ...interface{}) + func (le *LogEntry) Info(msg string) + func (le *LogEntry) InfoWith(msg string, fields Fields) + func (le *LogEntry) Infof(template string, args ...interface{}) + func (le *LogEntry) Infoln(args ...interface{}) + func (le *LogEntry) Infov(msg string, fields ...zapcore.Field) + func (le *LogEntry) Infow(msg string, keysAndValues ...interface{}) + func (le *LogEntry) Panic(msg string) + func (le *LogEntry) PanicWith(msg string, fields Fields) + func (le *LogEntry) Panicf(template string, args ...interface{}) + func (le *LogEntry) Panicln(args ...interface{}) + func (le *LogEntry) Panicv(msg string, fields ...zapcore.Field) + func (le *LogEntry) Panicw(msg string, keysAndValues ...interface{}) + func (le *LogEntry) Warn(msg string) + func (le *LogEntry) WarnWith(msg string, fields Fields) + func (le *LogEntry) Warnf(template string, args ...interface{}) + func (le *LogEntry) Warnln(args ...interface{}) + func (le *LogEntry) Warnv(msg string, fields ...zapcore.Field) + func (le *LogEntry) Warnw(msg string, keysAndValues ...interface{}) + func (le *LogEntry) WithFields(f Fields) *LogEntry