Documentation ¶
Overview ¶
Package logger provides a logger interface that is available to gadgets and runtimes.
Index ¶
- Constants
- type DedicatedLogger
- type DedicatedLoggerWithLevelSetter
- type GenericLogger
- type GenericLoggerWithLevelSetter
- type Level
- type LevelGetterSetter
- type Logger
- type StandardDedicatedLogger
- func (s *StandardDedicatedLogger) Debug(params ...any)
- func (s *StandardDedicatedLogger) Debugf(fmt string, params ...any)
- func (s *StandardDedicatedLogger) Error(params ...any)
- func (s *StandardDedicatedLogger) Errorf(fmt string, params ...any)
- func (s *StandardDedicatedLogger) Fatal(params ...any)
- func (s *StandardDedicatedLogger) Fatalf(fmt string, params ...any)
- func (s *StandardDedicatedLogger) Info(params ...any)
- func (s *StandardDedicatedLogger) Infof(fmt string, params ...any)
- func (s *StandardDedicatedLogger) Panic(params ...any)
- func (s *StandardDedicatedLogger) Panicf(fmt string, params ...any)
- func (s *StandardDedicatedLogger) Trace(params ...any)
- func (s *StandardDedicatedLogger) Tracef(fmt string, params ...any)
- func (s *StandardDedicatedLogger) Warn(params ...any)
- func (s *StandardDedicatedLogger) Warnf(fmt string, params ...any)
- type StandardGenericLogger
Constants ¶
View Source
const ( PanicLevel = log.PanicLevel FatalLevel = log.FatalLevel ErrorLevel = log.ErrorLevel WarnLevel = log.WarnLevel InfoLevel = log.InfoLevel DebugLevel = log.DebugLevel TraceLevel = log.TraceLevel )
we use the log levels from logrus here
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DedicatedLogger ¶ added in v0.15.0
type DedicatedLogger interface { Panic(params ...any) Panicf(fmt string, params ...any) Fatal(params ...any) Fatalf(fmt string, params ...any) Error(params ...any) Errorf(fmt string, params ...any) Warn(params ...any) Warnf(fmt string, params ...any) Info(params ...any) Infof(fmt string, params ...any) Debug(params ...any) Debugf(fmt string, params ...any) Trace(params ...any) Tracef(fmt string, params ...any) }
type DedicatedLoggerWithLevelSetter ¶ added in v0.15.0
type DedicatedLoggerWithLevelSetter interface { DedicatedLogger LevelGetterSetter }
type GenericLogger ¶ added in v0.15.0
type GenericLoggerWithLevelSetter ¶ added in v0.15.0
type GenericLoggerWithLevelSetter interface { GenericLogger LevelGetterSetter }
type LevelGetterSetter ¶ added in v0.15.0
type Logger ¶
type Logger interface { DedicatedLogger GenericLogger LevelGetterSetter }
func DefaultLogger ¶
func DefaultLogger() Logger
func NewFromDedicatedLogger ¶ added in v0.15.0
func NewFromDedicatedLogger(logger DedicatedLoggerWithLevelSetter) Logger
func NewFromGenericLogger ¶ added in v0.15.0
func NewFromGenericLogger(logger GenericLoggerWithLevelSetter) Logger
type StandardDedicatedLogger ¶ added in v0.15.0
type StandardDedicatedLogger struct {
GenericLoggerWithLevelSetter
}
func (*StandardDedicatedLogger) Debug ¶ added in v0.15.0
func (s *StandardDedicatedLogger) Debug(params ...any)
func (*StandardDedicatedLogger) Debugf ¶ added in v0.15.0
func (s *StandardDedicatedLogger) Debugf(fmt string, params ...any)
func (*StandardDedicatedLogger) Error ¶ added in v0.15.0
func (s *StandardDedicatedLogger) Error(params ...any)
func (*StandardDedicatedLogger) Errorf ¶ added in v0.15.0
func (s *StandardDedicatedLogger) Errorf(fmt string, params ...any)
func (*StandardDedicatedLogger) Fatal ¶ added in v0.15.0
func (s *StandardDedicatedLogger) Fatal(params ...any)
func (*StandardDedicatedLogger) Fatalf ¶ added in v0.15.0
func (s *StandardDedicatedLogger) Fatalf(fmt string, params ...any)
func (*StandardDedicatedLogger) Info ¶ added in v0.15.0
func (s *StandardDedicatedLogger) Info(params ...any)
func (*StandardDedicatedLogger) Infof ¶ added in v0.15.0
func (s *StandardDedicatedLogger) Infof(fmt string, params ...any)
func (*StandardDedicatedLogger) Panic ¶ added in v0.15.0
func (s *StandardDedicatedLogger) Panic(params ...any)
func (*StandardDedicatedLogger) Panicf ¶ added in v0.15.0
func (s *StandardDedicatedLogger) Panicf(fmt string, params ...any)
func (*StandardDedicatedLogger) Trace ¶ added in v0.15.0
func (s *StandardDedicatedLogger) Trace(params ...any)
func (*StandardDedicatedLogger) Tracef ¶ added in v0.15.0
func (s *StandardDedicatedLogger) Tracef(fmt string, params ...any)
func (*StandardDedicatedLogger) Warn ¶ added in v0.15.0
func (s *StandardDedicatedLogger) Warn(params ...any)
func (*StandardDedicatedLogger) Warnf ¶ added in v0.15.0
func (s *StandardDedicatedLogger) Warnf(fmt string, params ...any)
type StandardGenericLogger ¶ added in v0.15.0
type StandardGenericLogger struct {
DedicatedLoggerWithLevelSetter
}
func (*StandardGenericLogger) Log ¶ added in v0.15.0
func (s *StandardGenericLogger) Log(severity Level, params ...any)
Click to show internal directories.
Click to hide internal directories.