Documentation ¶
Overview ¶
Package log provides generic interface and implementations for logging.
The log package's structures are self-initialized by fx and bootstrapper. Fields are populated via yaml values or env variables. Env variables overwrite yaml configuration.
Package log provides generic interface and implementations for logging.
The log package's structures are self-initialized by fx and bootstrapper. Fields are populated via yaml values or env variables. Env variables overwrite yaml configuration.
Index ¶
- type DefaultLogger
- func (l DefaultLogger) Debug(args ...interface{})
- func (l DefaultLogger) Debugf(format string, args ...interface{})
- func (l DefaultLogger) Error(args ...interface{})
- func (l DefaultLogger) Errorf(format string, args ...interface{})
- func (l DefaultLogger) Fatal(args ...interface{})
- func (l DefaultLogger) Fatalf(format string, args ...interface{})
- func (l DefaultLogger) Info(args ...interface{})
- func (l DefaultLogger) Infof(format string, args ...interface{})
- func (l DefaultLogger) Warn(args ...interface{})
- func (l DefaultLogger) Warnf(format string, args ...interface{})
- type EmptyLogger
- func (l EmptyLogger) Debug(args ...interface{})
- func (l EmptyLogger) Debugf(format string, args ...interface{})
- func (l EmptyLogger) Error(args ...interface{})
- func (l EmptyLogger) Errorf(format string, args ...interface{})
- func (l EmptyLogger) Fatal(args ...interface{})
- func (l EmptyLogger) Fatalf(format string, args ...interface{})
- func (l EmptyLogger) Info(args ...interface{})
- func (l EmptyLogger) Infof(format string, args ...interface{})
- func (l EmptyLogger) Warn(args ...interface{})
- func (l EmptyLogger) Warnf(format string, args ...interface{})
- type LogElasticInitializationError
- type LogFileInitializationError
- type LogLevel
- type Logger
- type LogrusLogger
- func (l LogrusLogger) Debug(args ...interface{})
- func (l LogrusLogger) Debugf(format string, args ...interface{})
- func (l LogrusLogger) Error(args ...interface{})
- func (l LogrusLogger) Errorf(format string, args ...interface{})
- func (l LogrusLogger) Fatal(args ...interface{})
- func (l LogrusLogger) Fatalf(format string, args ...interface{})
- func (l LogrusLogger) Info(args ...interface{})
- func (l LogrusLogger) Infof(format string, args ...interface{})
- func (l LogrusLogger) Warn(args ...interface{})
- func (l LogrusLogger) Warnf(format string, args ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultLogger ¶
type DefaultLogger struct {
// contains filtered or unexported fields
}
DefaultLogger is a golang log package Logger implementation.
func (DefaultLogger) Debug ¶
func (l DefaultLogger) Debug(args ...interface{})
func (DefaultLogger) Debugf ¶
func (l DefaultLogger) Debugf(format string, args ...interface{})
func (DefaultLogger) Error ¶
func (l DefaultLogger) Error(args ...interface{})
func (DefaultLogger) Errorf ¶
func (l DefaultLogger) Errorf(format string, args ...interface{})
func (DefaultLogger) Fatal ¶
func (l DefaultLogger) Fatal(args ...interface{})
func (DefaultLogger) Fatalf ¶
func (l DefaultLogger) Fatalf(format string, args ...interface{})
func (DefaultLogger) Info ¶
func (l DefaultLogger) Info(args ...interface{})
func (DefaultLogger) Infof ¶
func (l DefaultLogger) Infof(format string, args ...interface{})
func (DefaultLogger) Warn ¶
func (l DefaultLogger) Warn(args ...interface{})
func (DefaultLogger) Warnf ¶
func (l DefaultLogger) Warnf(format string, args ...interface{})
type EmptyLogger ¶
type EmptyLogger struct{}
EmptyLogger is an empty Logger implementation.
func (EmptyLogger) Debug ¶
func (l EmptyLogger) Debug(args ...interface{})
func (EmptyLogger) Debugf ¶
func (l EmptyLogger) Debugf(format string, args ...interface{})
func (EmptyLogger) Error ¶
func (l EmptyLogger) Error(args ...interface{})
func (EmptyLogger) Errorf ¶
func (l EmptyLogger) Errorf(format string, args ...interface{})
func (EmptyLogger) Fatal ¶
func (l EmptyLogger) Fatal(args ...interface{})
func (EmptyLogger) Fatalf ¶
func (l EmptyLogger) Fatalf(format string, args ...interface{})
func (EmptyLogger) Info ¶
func (l EmptyLogger) Info(args ...interface{})
func (EmptyLogger) Infof ¶
func (l EmptyLogger) Infof(format string, args ...interface{})
func (EmptyLogger) Warn ¶
func (l EmptyLogger) Warn(args ...interface{})
func (EmptyLogger) Warnf ¶
func (l EmptyLogger) Warnf(format string, args ...interface{})
type LogElasticInitializationError ¶
LogElasticInitializationError fires when an elastic client throws an error.
func (*LogElasticInitializationError) Error ¶
func (e *LogElasticInitializationError) Error() string
type LogFileInitializationError ¶
LogFileInitializationError fires if Lumberjack throws an error.
func (*LogFileInitializationError) Error ¶
func (e *LogFileInitializationError) Error() string
type Logger ¶
type Logger interface { // Writes a debug message with a specific format. Debugf(format string, args ...interface{}) // Writes an info message with a specific format. Infof(format string, args ...interface{}) // Writes a warning message with a specific format. Warnf(format string, args ...interface{}) // Writes an error message with a specific format. Errorf(format string, args ...interface{}) // Writes a fatal message with a specific format. Fatalf(format string, args ...interface{}) // Writes a debug message. Debug(args ...interface{}) // Writes an info message. Info(args ...interface{}) // Writes a warning message. Warn(args ...interface{}) // Writes an error message. Error(args ...interface{}) // Writes a fatal message. Fatal(args ...interface{}) }
Logger is a generic logger interface.
func NewDefaultLogger ¶
func NewDefaultLogger(config *config.LoggerConfig) Logger
NewDefaultLogger is a golang log package Logger constructor.
func NewLogrusLogger ¶
func NewLogrusLogger(config *config.LoggerConfig) (Logger, error)
NewLogrusLogger creates a new logger compliant with the Logger interface.
type LogrusLogger ¶
type LogrusLogger struct {
// contains filtered or unexported fields
}
LogrusLogger is a logrus logger wrapper.
func (LogrusLogger) Debug ¶
func (l LogrusLogger) Debug(args ...interface{})
func (LogrusLogger) Debugf ¶
func (l LogrusLogger) Debugf(format string, args ...interface{})
func (LogrusLogger) Error ¶
func (l LogrusLogger) Error(args ...interface{})
func (LogrusLogger) Errorf ¶
func (l LogrusLogger) Errorf(format string, args ...interface{})
func (LogrusLogger) Fatal ¶
func (l LogrusLogger) Fatal(args ...interface{})
func (LogrusLogger) Fatalf ¶
func (l LogrusLogger) Fatalf(format string, args ...interface{})
func (LogrusLogger) Info ¶
func (l LogrusLogger) Info(args ...interface{})
func (LogrusLogger) Infof ¶
func (l LogrusLogger) Infof(format string, args ...interface{})
func (LogrusLogger) Warn ¶
func (l LogrusLogger) Warn(args ...interface{})
func (LogrusLogger) Warnf ¶
func (l LogrusLogger) Warnf(format string, args ...interface{})