Documentation ¶
Index ¶
- type BasicLogger
- func (l *BasicLogger) Debug(msg string)
- func (l *BasicLogger) Debugf(format string, args ...interface{})
- func (l *BasicLogger) Error(msg string)
- func (l *BasicLogger) Errorf(format string, args ...interface{})
- func (l *BasicLogger) Info(msg string)
- func (l *BasicLogger) Infof(format string, args ...interface{})
- func (l *BasicLogger) Warn(msg string)
- func (l *BasicLogger) Warnf(format string, args ...interface{})
- func (l *BasicLogger) WithFields(fields ...Field) Logger
- type Field
- func Any(key string, value interface{}) Field
- func Bool(key string, value bool) Field
- func Duration(key string, value time.Duration) Field
- func Float64(key string, value float64) Field
- func Int(key string, value int) Field
- func Int64(key string, value int64) Field
- func String(key string, value string) Field
- func Time(key string, value time.Time) Field
- type Logger
- type NoOpLogger
- func (l *NoOpLogger) Debug(_ string)
- func (l *NoOpLogger) Debugf(_ string, _ ...interface{})
- func (l *NoOpLogger) Error(_ string)
- func (l *NoOpLogger) Errorf(_ string, _ ...interface{})
- func (l *NoOpLogger) Info(_ string)
- func (l *NoOpLogger) Infof(_ string, _ ...interface{})
- func (l *NoOpLogger) Warn(_ string)
- func (l *NoOpLogger) Warnf(_ string, _ ...interface{})
- func (l *NoOpLogger) WithFields(_ ...Field) Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasicLogger ¶
type BasicLogger struct {
// contains filtered or unexported fields
}
BasicLogger uses the standard library log package for logging.
func (*BasicLogger) Debug ¶
func (l *BasicLogger) Debug(msg string)
func (*BasicLogger) Debugf ¶
func (l *BasicLogger) Debugf(format string, args ...interface{})
func (*BasicLogger) Error ¶
func (l *BasicLogger) Error(msg string)
func (*BasicLogger) Errorf ¶
func (l *BasicLogger) Errorf(format string, args ...interface{})
func (*BasicLogger) Info ¶
func (l *BasicLogger) Info(msg string)
func (*BasicLogger) Infof ¶
func (l *BasicLogger) Infof(format string, args ...interface{})
func (*BasicLogger) Warn ¶
func (l *BasicLogger) Warn(msg string)
func (*BasicLogger) Warnf ¶
func (l *BasicLogger) Warnf(format string, args ...interface{})
func (*BasicLogger) WithFields ¶
func (l *BasicLogger) WithFields(fields ...Field) Logger
type Field ¶
type Field struct { Key string Value interface{} }
Field represents a key-value pair for structured logging.
type Logger ¶
type Logger interface { Debug(msg string) Info(msg string) Warn(msg string) Error(msg string) Debugf(format string, args ...interface{}) Infof(format string, args ...interface{}) Warnf(format string, args ...interface{}) Errorf(format string, args ...interface{}) WithFields(fields ...Field) Logger }
Logger interface defines the logging functionality required by the client.
func NewBasicLogger ¶
func NewBasicLogger() Logger
NewBasicLogger creates a new BasicLogger that writes to stdout.
type NoOpLogger ¶
type NoOpLogger struct{}
NoOpLogger is a logger that does nothing, used as a default when no logger is provided.
func (*NoOpLogger) Debug ¶
func (l *NoOpLogger) Debug(_ string)
func (*NoOpLogger) Debugf ¶
func (l *NoOpLogger) Debugf(_ string, _ ...interface{})
func (*NoOpLogger) Error ¶
func (l *NoOpLogger) Error(_ string)
func (*NoOpLogger) Errorf ¶
func (l *NoOpLogger) Errorf(_ string, _ ...interface{})
func (*NoOpLogger) Info ¶
func (l *NoOpLogger) Info(_ string)
func (*NoOpLogger) Infof ¶
func (l *NoOpLogger) Infof(_ string, _ ...interface{})
func (*NoOpLogger) Warn ¶
func (l *NoOpLogger) Warn(_ string)
func (*NoOpLogger) Warnf ¶
func (l *NoOpLogger) Warnf(_ string, _ ...interface{})
func (*NoOpLogger) WithFields ¶
func (l *NoOpLogger) WithFields(_ ...Field) Logger
Click to show internal directories.
Click to hide internal directories.