Documentation
¶
Index ¶
- func Debug(format string, args ...interface{})
- func Error(format string, args ...interface{})
- func Fatal(format string, args ...interface{})
- func Info(format string, args ...interface{})
- func IsLevelEnabled(level Level) bool
- func SetLevel(level Level)
- func SetLevelS(level string)
- func Trace(format string, args ...interface{})
- func Warn(format string, args ...interface{})
- type Level
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Debug ¶
func Debug(format string, args ...interface{})
Debug log formatted message at debug level
func Error ¶
func Error(format string, args ...interface{})
Error log formatted message at error level
func Fatal ¶ added in v0.2.0
func Fatal(format string, args ...interface{})
Fatal log formatted message at fatal level Calls os.Exit(1) after logging
func IsLevelEnabled ¶ added in v0.2.0
IsLevelEnabled checks if the log level of the standard logger is greater than the level param
func SetLevelS ¶ added in v0.2.0
func SetLevelS(level string)
SetLevelS sets the standard logger level from string. Level can be: trace, debug, info, error or fatal
Types ¶
type Level ¶ added in v0.2.0
type Level uint32
Level type
const ( // FatalLevel level, highest level of severity. Logs and then calls `logger.Exit(1)`. It will exit even if the // logging level is set to Panic. FatalLevel Level = iota + 1 // ErrorLevel level. Logs. Used for errors that should definitely be noted. // Commonly used for hooks to send errors to an error tracking service. ErrorLevel // WarnLevel level. Non-critical entries that deserve eyes. WarnLevel // InfoLevel level. General operational entries about what's going on inside the // application. InfoLevel // DebugLevel level. Usually only enabled when debugging. Very verbose logging. DebugLevel // TraceLevel level. Designates finer-grained informational events than the Debug. TraceLevel )
These are the different logging levels. You can set the logging level to log on your instance of logger, obtained with `logrus.New()`.
Click to show internal directories.
Click to hide internal directories.