Documentation ¶
Index ¶
- Constants
- Variables
- func Critical(v ...interface{})
- func Criticalf(format string, v ...interface{})
- func Debug(v ...interface{})
- func Debugf(format string, v ...interface{})
- func Disable()
- func Enable()
- func Error(v ...interface{})
- func Errorf(format string, v ...interface{})
- func Fatal(v ...interface{})
- func Fatalf(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 LevelFatal )
The various logging levels.
Variables ¶
var Level logLevel = LevelDebug
Level stores the current logging level.
Functions ¶
func Critical ¶
func Critical(v ...interface{})
Critical logs its arguments at the "critical" level. The arguments are handled in the same manner as fmt.Print.
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 Debug ¶
func Debug(v ...interface{})
Debug logs its arguments at the "debug" level. The arguments are handled in the same manner as fmt.Print.
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 Disable ¶
func Disable()
Disable disables logging altogether, regardless of level. However, calls to Fatal and Fatalf will still halt the process; they just won't log anything. Calling Disable when logging is already disabled is a no-op.
func Enable ¶
func Enable()
Enable enables logging if it has previously been disabled with Disable. Calling Enable when logging is already enabled is a no-op.
func Error ¶
func Error(v ...interface{})
Error logs its arguments at the "error" level. The arguments are handled in the same manner as fmt.Print.
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.
func Fatal ¶
func Fatal(v ...interface{})
Fatal logs its arguments at the "fatal" level and then exits. The arguments are handled in the same manner as fmt.Print.
func Fatalf ¶
func Fatalf(format string, v ...interface{})
Fatalf logs a formatted message at the "fatal" level and then exits. The arguments are handled in the same manner as fmt.Printf.
func Info ¶
func Info(v ...interface{})
Info logs its arguments at the "info" level. The arguments are handled in the same manner as fmt.Print.
func Infof ¶
func Infof(format string, v ...interface{})
Infof logs a formatted message at the "info" level. The arguments are handled in the same manner as fmt.Printf.
Types ¶
This section is empty.