Documentation
¶
Index ¶
- type BasicLogger
- type Fields
- type Logger
- type NoOpLogger
- func (l *NoOpLogger) Debug(args ...any)
- func (l *NoOpLogger) Debugf(format string, args ...any)
- func (l *NoOpLogger) Error(args ...any)
- func (l *NoOpLogger) Errorf(format string, args ...any)
- func (l *NoOpLogger) Info(args ...any)
- func (l *NoOpLogger) Infof(format string, args ...any)
- func (l *NoOpLogger) Warn(args ...any)
- func (l *NoOpLogger) Warnf(format string, args ...any)
- func (l *NoOpLogger) WithError(_ error) Logger
- func (l *NoOpLogger) WithField(_ string, _ any) Logger
- func (l *NoOpLogger) WithFields(_ Fields) Logger
- type TestLogger
- func (l *TestLogger) Debug(args ...any)
- func (l *TestLogger) Debugf(format string, args ...any)
- func (l *TestLogger) Error(args ...any)
- func (l *TestLogger) Errorf(format string, args ...any)
- func (l *TestLogger) Fatal(args ...any)
- func (l *TestLogger) Fatalf(format string, args ...any)
- func (l *TestLogger) Info(args ...any)
- func (l *TestLogger) Infof(format string, args ...any)
- func (l *TestLogger) Panic(args ...any)
- func (l *TestLogger) Panicf(format string, args ...any)
- func (l *TestLogger) Print(args ...any)
- func (l *TestLogger) Printf(format string, args ...any)
- func (l *TestLogger) SetLevel(lvl int)
- func (l *TestLogger) Warn(args ...any)
- func (l *TestLogger) Warnf(format string, args ...any)
- func (l *TestLogger) WithError(err error) Logger
- func (l *TestLogger) WithField(key string, value any) Logger
- func (l *TestLogger) WithFields(fields Fields) Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasicLogger ¶
type NoOpLogger ¶
type NoOpLogger struct{}
func NewNoOpLogger ¶
func NewNoOpLogger() *NoOpLogger
func (*NoOpLogger) Debug ¶
func (l *NoOpLogger) Debug(args ...any)
func (*NoOpLogger) Debugf ¶
func (l *NoOpLogger) Debugf(format string, args ...any)
func (*NoOpLogger) Error ¶
func (l *NoOpLogger) Error(args ...any)
func (*NoOpLogger) Errorf ¶
func (l *NoOpLogger) Errorf(format string, args ...any)
func (*NoOpLogger) Info ¶
func (l *NoOpLogger) Info(args ...any)
func (*NoOpLogger) Infof ¶
func (l *NoOpLogger) Infof(format string, args ...any)
func (*NoOpLogger) Warn ¶
func (l *NoOpLogger) Warn(args ...any)
func (*NoOpLogger) Warnf ¶
func (l *NoOpLogger) Warnf(format string, args ...any)
func (*NoOpLogger) WithError ¶
func (l *NoOpLogger) WithError(_ error) Logger
func (*NoOpLogger) WithFields ¶
func (l *NoOpLogger) WithFields(_ Fields) Logger
type TestLogger ¶ added in v0.2.0
type TestLogger struct {
// contains filtered or unexported fields
}
TestLogger is supposed to be used in the Go testing framework.
func NewTestLogger ¶ added in v0.2.0
func NewTestLogger(t *testing.T) *TestLogger
func (*TestLogger) Debug ¶ added in v0.2.0
func (l *TestLogger) Debug(args ...any)
func (*TestLogger) Debugf ¶ added in v0.2.0
func (l *TestLogger) Debugf(format string, args ...any)
func (*TestLogger) Error ¶ added in v0.2.0
func (l *TestLogger) Error(args ...any)
func (*TestLogger) Errorf ¶ added in v0.2.0
func (l *TestLogger) Errorf(format string, args ...any)
func (*TestLogger) Fatal ¶ added in v0.2.0
func (l *TestLogger) Fatal(args ...any)
func (*TestLogger) Fatalf ¶ added in v0.2.0
func (l *TestLogger) Fatalf(format string, args ...any)
func (*TestLogger) Info ¶ added in v0.2.0
func (l *TestLogger) Info(args ...any)
func (*TestLogger) Infof ¶ added in v0.2.0
func (l *TestLogger) Infof(format string, args ...any)
func (*TestLogger) Panic ¶ added in v0.2.0
func (l *TestLogger) Panic(args ...any)
func (*TestLogger) Panicf ¶ added in v0.2.0
func (l *TestLogger) Panicf(format string, args ...any)
func (*TestLogger) Print ¶ added in v0.2.0
func (l *TestLogger) Print(args ...any)
func (*TestLogger) Printf ¶ added in v0.2.0
func (l *TestLogger) Printf(format string, args ...any)
func (*TestLogger) SetLevel ¶ added in v0.2.0
func (l *TestLogger) SetLevel(lvl int)
SetLevel sets the log level for the logger. -8: Trace -4: Debug 0: Info 4: Warn 8: Error 12: Fatal 16: Panic
func (*TestLogger) Warn ¶ added in v0.2.0
func (l *TestLogger) Warn(args ...any)
func (*TestLogger) Warnf ¶ added in v0.2.0
func (l *TestLogger) Warnf(format string, args ...any)
func (*TestLogger) WithError ¶ added in v0.2.0
func (l *TestLogger) WithError(err error) Logger
func (*TestLogger) WithField ¶ added in v0.2.0
func (l *TestLogger) WithField(key string, value any) Logger
func (*TestLogger) WithFields ¶ added in v0.2.0
func (l *TestLogger) WithFields(fields Fields) Logger
Click to show internal directories.
Click to hide internal directories.