Documentation ¶
Overview ¶
Package log implements a wrapper around the Go standard library's logging package. Clients should set the current log level; only messages below that level will actually be logged. For example, if Level is set to LevelWarning, only log messages at the Warning, Error, and Critical levels will be logged.
Index ¶
- Constants
- Variables
- func Critical(v ...interface{})
- func Criticalf(format string, v ...interface{})
- func Debug(v ...interface{})
- func Debugf(format string, v ...interface{})
- func Error(v ...interface{})
- func Errorf(format string, v ...interface{})
- func Info(v ...interface{})
- func Infof(format string, v ...interface{})
- func Warning(v ...interface{})
- func Warningf(format string, v ...interface{})
Constants ¶
const ( LevelDebug = iota LevelInfo LevelWarning LevelError LevelCritical )
The following constants represent logging levels in increasing levels of seriousness.
Variables ¶
var Level = LevelDebug
Level stores the current logging level.
Functions ¶
func Critical ¶
func Critical(v ...interface{})
Critical logs its arguments at the "critical" level.
func Criticalf ¶
func Criticalf(format string, v ...interface{})
Criticalf logs a formatted message at the "critical" level. The arguments are handled in the same manner as fmt.Printf.
func Debugf ¶
func Debugf(format string, v ...interface{})
Debugf logs a formatted message at the "debug" level. The arguments are handled in the same manner as fmt.Printf.
func Errorf ¶
func Errorf(format string, v ...interface{})
Errorf logs a formatted message at the "error" level. The arguments are handled in the same manner as fmt.Printf.
Types ¶
This section is empty.