Versions in this module Expand all Collapse all v0 v0.1.0 Apr 17, 2025 v0.0.2 Mar 27, 2025 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 Func func(msg string, fields ...zap.Field) + 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 MockLogger struct + func NewMockLogger(ctrl *gomock.Controller) *MockLogger + func (m *MockLogger) Debug(arg0 string, arg1 ...zapcore.Field) + func (m *MockLogger) EXPECT() *MockLoggerMockRecorder + func (m *MockLogger) Enabled(arg0 Level) bool + func (m *MockLogger) Error(arg0 string, arg1 ...zapcore.Field) + func (m *MockLogger) Fatal(arg0 string, arg1 ...zapcore.Field) + func (m *MockLogger) Info(arg0 string, arg1 ...zapcore.Field) + func (m *MockLogger) RecoverAndExit(arg0, arg1 func()) + func (m *MockLogger) RecoverAndPanic(arg0 func()) + func (m *MockLogger) SetLevel(arg0 Level) + func (m *MockLogger) Stop() + func (m *MockLogger) StopOnPanic() + func (m *MockLogger) Trace(arg0 string, arg1 ...zapcore.Field) + func (m *MockLogger) Verbo(arg0 string, arg1 ...zapcore.Field) + func (m *MockLogger) Warn(arg0 string, arg1 ...zapcore.Field) + func (m *MockLogger) Write(arg0 []byte) (int, error) + type MockLoggerMockRecorder struct + func (mr *MockLoggerMockRecorder) Debug(arg0 interface{}, arg1 ...interface{}) *gomock.Call + func (mr *MockLoggerMockRecorder) Enabled(arg0 interface{}) *gomock.Call + func (mr *MockLoggerMockRecorder) Error(arg0 interface{}, arg1 ...interface{}) *gomock.Call + func (mr *MockLoggerMockRecorder) Fatal(arg0 interface{}, arg1 ...interface{}) *gomock.Call + func (mr *MockLoggerMockRecorder) Info(arg0 interface{}, arg1 ...interface{}) *gomock.Call + func (mr *MockLoggerMockRecorder) RecoverAndExit(arg0, arg1 interface{}) *gomock.Call + func (mr *MockLoggerMockRecorder) RecoverAndPanic(arg0 interface{}) *gomock.Call + func (mr *MockLoggerMockRecorder) SetLevel(arg0 interface{}) *gomock.Call + func (mr *MockLoggerMockRecorder) Stop() *gomock.Call + func (mr *MockLoggerMockRecorder) StopOnPanic() *gomock.Call + func (mr *MockLoggerMockRecorder) Trace(arg0 interface{}, arg1 ...interface{}) *gomock.Call + func (mr *MockLoggerMockRecorder) Verbo(arg0 interface{}, arg1 ...interface{}) *gomock.Call + func (mr *MockLoggerMockRecorder) Warn(arg0 interface{}, arg1 ...interface{}) *gomock.Call + func (mr *MockLoggerMockRecorder) Write(arg0 interface{}) *gomock.Call + 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