Export package func to a standard logger.

This commit is contained in:
Antoine Grondin
2014-07-15 18:30:01 -04:00
parent 23c2cf5a8b
commit e5621dca87
7 changed files with 143 additions and 56 deletions
+12 -12
View File
@@ -13,22 +13,22 @@ type Level uint8
// These are the different logging levels. You can set the logging level to log
// on your instance of logger, obtained with `logrus.New()`.
const (
// Panic level, highest level of severity. Logs and then calls panic with the
// PanicLevel level, highest level of severity. Logs and then calls panic with the
// message passed to Debug, Info, ...
Panic Level = iota
// Fatal level. Logs and then calls `os.Exit(1)`. It will exit even if the
PanicLevel Level = iota
// FatalLevel level. Logs and then calls `os.Exit(1)`. It will exit even if the
// logging level is set to Panic.
Fatal
// Error level. Logs. Used for errors that should definitely be noted.
FatalLevel
// ErrorLevel level. Logs. Used for errors that should definitely be noted.
// Commonly used for hooks to send errors to an error tracking service.
Error
// Warn level. Non-critical entries that deserve eyes.
Warn
// Info level. General operational entries about what's going on inside the
ErrorLevel
// WarnLevel level. Non-critical entries that deserve eyes.
WarnLevel
// InfoLevel level. General operational entries about what's going on inside the
// application.
Info
// Debug level. Usually only enabled when debugging. Very verbose logging.
Debug
InfoLevel
// DebugLevel level. Usually only enabled when debugging. Very verbose logging.
DebugLevel
)
// Won't compile if StdLogger can't be realized by a log.Logger