Versions in this module Expand all Collapse all v1 v1.9.0 Oct 3, 2022 Changes in this version + var Discard io.WriteCloser = discard + 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 + Assertions bool + 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 + AssertDeferredNoError func(f func() error) + AssertDeferredTrue func(f func() bool, msg string, fields ...zap.Field) + AssertNoError func(err error) + AssertTrue func(b bool, msg string, fields ...zap.Field) + Debug func(msg string, fields ...zap.Field) + 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()) + 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(assertionsEnabled bool, prefix string, wrappedCores ...WrappedCore) Logger + type MockLogger struct + func NewMockLogger(ctrl *gomock.Controller) *MockLogger + func (m *MockLogger) AssertDeferredNoError(f func() error) + func (m *MockLogger) AssertDeferredTrue(f func() bool, format string, args ...zap.Field) + func (m *MockLogger) AssertNoError(err error) + func (m *MockLogger) AssertTrue(b bool, format string, args ...zap.Field) + func (m *MockLogger) Debug(format string, args ...zap.Field) + func (m *MockLogger) EXPECT() *MockLoggerMockRecorder + func (m *MockLogger) Error(format string, args ...zap.Field) + func (m *MockLogger) Fatal(format string, args ...zap.Field) + func (m *MockLogger) Info(format string, args ...zap.Field) + func (m *MockLogger) RecoverAndExit(f, exit func()) + func (m *MockLogger) RecoverAndPanic(f func()) + func (m *MockLogger) Stop() + func (m *MockLogger) StopOnPanic() + func (m *MockLogger) Trace(format string, args ...zap.Field) + func (m *MockLogger) Verbo(format string, args ...zap.Field) + func (m *MockLogger) Warn(format string, args ...zap.Field) + func (m *MockLogger) Write(p []byte) (int, error) + type MockLoggerMockRecorder struct + func (mr *MockLoggerMockRecorder) AssertDeferredNoError(f interface{}) *gomock.Call + func (mr *MockLoggerMockRecorder) AssertDeferredTrue(f, format interface{}, args ...interface{}) *gomock.Call + func (mr *MockLoggerMockRecorder) AssertNoError(err interface{}) *gomock.Call + func (mr *MockLoggerMockRecorder) AssertTrue(b, format interface{}, args ...interface{}) *gomock.Call + func (mr *MockLoggerMockRecorder) Debug(format interface{}, args ...interface{}) *gomock.Call + func (mr *MockLoggerMockRecorder) Error(format interface{}, args ...interface{}) *gomock.Call + func (mr *MockLoggerMockRecorder) Fatal(format interface{}, args ...interface{}) *gomock.Call + func (mr *MockLoggerMockRecorder) Info(format interface{}, args ...interface{}) *gomock.Call + func (mr *MockLoggerMockRecorder) RecoverAndExit(f, exit interface{}) *gomock.Call + func (mr *MockLoggerMockRecorder) RecoverAndPanic(f interface{}) *gomock.Call + func (mr *MockLoggerMockRecorder) Stop() *gomock.Call + func (mr *MockLoggerMockRecorder) StopOnPanic() *gomock.Call + func (mr *MockLoggerMockRecorder) Trace(format interface{}, args ...interface{}) *gomock.Call + func (mr *MockLoggerMockRecorder) Verbo(format interface{}, args ...interface{}) *gomock.Call + func (mr *MockLoggerMockRecorder) Warn(format interface{}, args ...interface{}) *gomock.Call + func (mr *MockLoggerMockRecorder) Write(p interface{}) *gomock.Call + type NoLog struct + func (NoLog) AssertDeferredNoError(func() error) + func (NoLog) AssertDeferredTrue(func() bool, string, ...zap.Field) + func (NoLog) AssertNoError(error) + func (NoLog) AssertTrue(bool, string, ...zap.Field) + func (NoLog) Debug(string, ...zap.Field) + 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) 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([]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