Versions in this module Expand all Collapse all v1 v1.11.13-rc.2 Dec 4, 2024 v1.0.0 Dec 4, 2024 Changes in this version + var Discard io.WriteCloser = discard + var ErrUnknownLevel = errors.New("unknown log level") + func UserString(key, val string) zap.Field + func UserStrings(key string, val []string) zap.Field + type Color string + const Black + const Blue + const Bold + const Cyan + const DarkGray + const Green + const LightBlue + const LightCyan + const LightGray + const LightGreen + const LightPurple + const LightRed + const Orange + const Purple + const Red + const Reset + const Reverse + const White + const Yellow + func (lc Color) Wrap(text string) string + type Config struct + DisableWriterDisplaying bool + DisplayLevel Level + LogFormat Format + LogLevel Level + LoggerName string + MsgPrefix string + type Factory interface + Close func() + GetDisplayLevel func(name string) (Level, error) + GetLogLevel func(name string) (Level, error) + GetLoggerNames func() []string + Make func(name string) (Logger, error) + MakeChain func(chainID string) (Logger, error) + SetDisplayLevel func(name string, level Level) error + SetLogLevel func(name string, level Level) error + func NewFactory(config Config) Factory + type Format int + const Colors + const JSON + const Plain + func ToFormat(h string, fd uintptr) (Format, error) + func (f Format) ConsoleEncoder() zapcore.Encoder + func (f Format) FileEncoder() zapcore.Encoder + func (f Format) MarshalJSON() ([]byte, error) + func (f Format) WrapPrefix(prefix string) string + type Level zapcore.Level + const Debug + const Error + const Fatal + const Info + const Off + const Trace + const Verbo + const Warn + func ToLevel(l string) (Level, error) + func (l *Level) UnmarshalJSON(b []byte) error + func (l Level) LowerString() string + func (l Level) MarshalJSON() ([]byte, error) + func (l Level) String() string + type Logger interface + Debug func(msg string, fields ...zap.Field) + Enabled func(lvl Level) bool + Error func(msg string, fields ...zap.Field) + Fatal func(msg string, fields ...zap.Field) + Info func(msg string, fields ...zap.Field) + RecoverAndExit func(f, exit func()) + RecoverAndPanic func(f func()) + SetLevel func(level Level) + Stop func() + StopOnPanic func() + Trace func(msg string, fields ...zap.Field) + Verbo func(msg string, fields ...zap.Field) + Warn func(msg string, fields ...zap.Field) + func NewLogger(prefix string, wrappedCores ...WrappedCore) Logger + type NoLog struct + func (NoLog) Debug(string, ...zap.Field) + func (NoLog) Enabled(Level) bool + func (NoLog) Error(string, ...zap.Field) + func (NoLog) Fatal(string, ...zap.Field) + func (NoLog) Info(string, ...zap.Field) + func (NoLog) RecoverAndExit(f, exit func()) + func (NoLog) RecoverAndPanic(f func()) + func (NoLog) SetLevel(Level) + func (NoLog) Stop() + func (NoLog) StopOnPanic() + func (NoLog) Trace(string, ...zap.Field) + func (NoLog) Verbo(string, ...zap.Field) + func (NoLog) Warn(string, ...zap.Field) + func (NoLog) Write(b []byte) (int, error) + type NoWarn struct + func (NoWarn) Error(string, ...zap.Field) + func (NoWarn) Fatal(string, ...zap.Field) + func (NoWarn) Warn(string, ...zap.Field) + type RotatingWriterConfig struct + Compress bool + Directory string + MaxAge int + MaxFiles int + MaxSize int + type WrappedCore struct + AtomicLevel zap.AtomicLevel + Core zapcore.Core + Writer io.WriteCloser + WriterDisabled bool + func NewWrappedCore(level Level, rw io.WriteCloser, encoder zapcore.Encoder) WrappedCore