Documentation ¶
Index ¶
- Constants
- type Logger
- func (l *Logger) Debug(msg string, keysAndValues ...interface{})
- func (l *Logger) Debugf(format string, values ...interface{})
- func (l *Logger) Debugln(values ...interface{})
- func (l *Logger) Error(msg string, keysAndValues ...interface{})
- func (l *Logger) Errorf(format string, values ...interface{})
- func (l *Logger) Errorln(values ...interface{})
- func (l *Logger) Fatal(values ...interface{})
- func (l *Logger) Fatalf(format string, values ...interface{})
- func (l *Logger) Fatalln(values ...interface{})
- func (l *Logger) Info(msg string, keysAndValues ...interface{})
- func (l *Logger) Infof(format string, values ...interface{})
- func (l *Logger) Infoln(values ...interface{})
- func (l *Logger) LogLevel() int
- func (l *Logger) SetLogLevel(level int) error
- func (l *Logger) SetStdDest(stdout io.Writer, stderr io.Writer)
- func (l *Logger) Warn(msg string, keysAndValues ...interface{})
- func (l *Logger) Warnf(format string, values ...interface{})
- func (l *Logger) Warnln(values ...interface{})
Constants ¶
const ( LogLevelNone = iota LogLevelError LogLevelInfo LogLevelDebug )
Logger levels available
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger represents lab's internal logger structure, which has a different log.Logger for each level, allowing different destination (file or fd) in different levels and also different prefixes.
func (*Logger) Debug ¶
Debug prints warning messages (prefixed with "DEBUG:"). These parameters match the retryablehttp.LeveledLogger, which we want to satisfy for silencing thier debug messages being printed in the stdout. Debug messages require at least LogLevelDebug level.
func (*Logger) Debugf ¶
Debugf prints formated debug message (prefixed with "DEBUG:"). Debug messages require at least LogLevelDebug level.
func (*Logger) Debugln ¶
func (l *Logger) Debugln(values ...interface{})
Debugln prints debug values in a new line (prefixed with "DEBUG:"). Debug messages require at least LogLevelDebug level.
func (*Logger) Error ¶
Error prints error messages (prefixed with "ERROR:"). These parameters match the retryablehttp.LeveledLogger, which we want to satisfy for silencing their debug messages being printed in the stdout. Error message are always printed, regardless the log level.
func (*Logger) Errorf ¶
Errorf prints formated error message (prefixed with "ERROR:"). Error message are always printed, regardless the log level.
func (*Logger) Errorln ¶
func (l *Logger) Errorln(values ...interface{})
Errorln prints error values in a new line (prefixed with "ERROR:"). Error message are always printed, regardless the log level.
func (*Logger) Fatal ¶
func (l *Logger) Fatal(values ...interface{})
Fatal prints the values and exit the program with os.Exit()
func (*Logger) Fatalln ¶
func (l *Logger) Fatalln(values ...interface{})
Fatalln prints the values in a new line and exit the program with os.Exit()
func (*Logger) Info ¶
Info prints informational messages (prefixed with "INFO:"). These parameters match the retryablehttp.LeveledLogger, which we want to satisfy for silencing their debug messages being printed in the stdout. Info messages require at least LogLevelInfo level.
func (*Logger) Infof ¶
Infof prints formated informational message (prefixed with "INFO:"). Info messages require at least LogLevelInfo level.
func (*Logger) Infoln ¶
func (l *Logger) Infoln(values ...interface{})
Infoln prints info values in a new line (prefixed with "INFO:"). Info messages require at least LogLevelInfo level.
func (*Logger) SetLogLevel ¶
SetLogLevel set the level of the internal logger. Allowed values are LogLevel{Error,Info,Debug,None}.
func (*Logger) SetStdDest ¶
SetStdDest sets what's the desired stdout and stderr for the internal log. It can be any io.Writer value.
func (*Logger) Warn ¶
Warn prints warning messages (prefixed with "WARNING:"). These parameters match the retryablehttp.LeveledLogger, which we want to satisfy for silencing their debug messages being printed in the stdout. Warning messages require at least LogLevelInfo level.