Documentation
¶
Index ¶
- func Debugf(format string, args ...interface{})
- func Errorf(format string, args ...interface{})
- func Fatalf(format string, args ...interface{})
- func Info(format string)
- func Infof(format string, args ...interface{})
- func Panicf(format string, args ...interface{})
- func SetLevel(v Verbosity)
- func SetLoggerImpl(newLogger Logger)
- func Warningf(format string, args ...interface{})
- type Logger
- type StandardGolangLogger
- func (l *StandardGolangLogger) Debugf(format string, args ...interface{})
- func (l *StandardGolangLogger) Errorf(format string, args ...interface{})
- func (l *StandardGolangLogger) Fatalf(format string, args ...interface{})
- func (l *StandardGolangLogger) Info(format string)
- func (l *StandardGolangLogger) Infof(format string, args ...interface{})
- func (l *StandardGolangLogger) Panicf(format string, args ...interface{})
- func (l *StandardGolangLogger) Warningf(format string, args ...interface{})
- type Verbosity
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Debugf ¶
func Debugf(format string, args ...interface{})
Debugf logs events labeled with DEBUG severity.
func Errorf ¶
func Errorf(format string, args ...interface{})
Errorf logs events labeled with ERROR severity.
func Fatalf ¶
func Fatalf(format string, args ...interface{})
Fatalf logs the message and internally will call os.Exit(1). This log level cannot be overridden by configuration changes.
func Infof ¶
func Infof(format string, args ...interface{})
Infof logs events labeled with INFO severity.
func Panicf ¶
func Panicf(format string, args ...interface{})
Panicf logs the message and internally will call panic() using the message as an argument. This log level cannot be overridden by configuration changes.
func SetLoggerImpl ¶
func SetLoggerImpl(newLogger Logger)
SetLoggerImpl lets you override the Logger implementation. Calls are not thread-safe, so set this first thing at application start.
Types ¶
type Logger ¶
type Logger interface {
// Debugf logs events labeled with DEBUG severity.
Debugf(format string, args ...interface{})
// Infof logs events labeled with INFO severity.
Infof(format string, args ...interface{})
// Info logs events labeled with INFO severity.
Info(format string)
// Warningf logs events labeled with WARNING severity.
Warningf(format string, args ...interface{})
// Errorf logs events labeled with ERROR severity.
Errorf(format string, args ...interface{})
// Fatalf logs the message and internally will call os.Exit(1). This log
// level cannot be overridden by configuration changes.
//
// Any implementation of this interface MUST call os.Exit(1) internally.
Fatalf(format string, args ...interface{})
// Panicf logs the message and internally will call panic() using the
// message as an argument. This log level cannot be overridden by
// configuration changes.
//
// Any implementation of this interface MUST call panic() internally.
Panicf(format string, args ...interface{})
}
Logger provides a general interface for generic logging functionality. Implementers who want to utilize a different logging library/strategy can use this interface to plug in a different implementation.
type StandardGolangLogger ¶
type StandardGolangLogger struct {
VerbosityLevel Verbosity
}
func (*StandardGolangLogger) Debugf ¶
func (l *StandardGolangLogger) Debugf(format string, args ...interface{})
func (*StandardGolangLogger) Errorf ¶
func (l *StandardGolangLogger) Errorf(format string, args ...interface{})
func (*StandardGolangLogger) Fatalf ¶
func (l *StandardGolangLogger) Fatalf(format string, args ...interface{})
func (*StandardGolangLogger) Info ¶
func (l *StandardGolangLogger) Info(format string)
func (*StandardGolangLogger) Infof ¶
func (l *StandardGolangLogger) Infof(format string, args ...interface{})
func (*StandardGolangLogger) Panicf ¶
func (l *StandardGolangLogger) Panicf(format string, args ...interface{})
func (*StandardGolangLogger) Warningf ¶
func (l *StandardGolangLogger) Warningf(format string, args ...interface{})