Documentation ¶
Index ¶
- Constants
- Variables
- func Criticalf(format string, args ...interface{})
- func Criticalln(args ...interface{})
- func Debugf(format string, args ...interface{})
- func Debugln(args ...interface{})
- func ErrorIf(err error) error
- func Errorf(format string, args ...interface{})
- func Errorln(args ...interface{})
- func Infof(format string, args ...interface{})
- func Infoln(args ...interface{})
- func Logf(verbose Verbose, callerSkipBeforeReachingHere int, format string, ...)
- func Logln(verbose Verbose, callerSkipBeforeReachingHere int, args ...interface{})
- func Requestf(format string, args ...interface{})
- func Requestln(args ...interface{})
- func SetOutput(output io.Writer)
- func SetOutputFile(filename string) (err error)
- func Warningf(format string, args ...interface{})
- func Warningln(args ...interface{})
- type Verbose
Constants ¶
View Source
const ( // QUIET hide every information QUIET = Verbose(0) // CRITICAL hide most informations, // only the worst errors are shown CRITICAL = Verbose(1) // ERROR hide all non-essential informations, // only errors are shown ERROR = Verbose(2) // WARNING show all errors, // even thoses who aren't WARNING = Verbose(3) // INFO show every important steps of the workflow, // like server start, stop, update things, ... INFO = Verbose(4) // REQUEST show the same messages as INFO, // but show also the requests made by users REQUEST = Verbose(5) // DEBUG is the maximum verbosity level, // every pieces of useful informations are printed DEBUG = Verbose(6) )
Variables ¶
View Source
var VerboseMapping = map[string]Verbose{ "quiet": QUIET, "critical": CRITICAL, "error": ERROR, "warning": WARNING, "info": INFO, "request": REQUEST, "debug": DEBUG, }
VerboseMapping is the translation between the verbose common name and the verbose type
View Source
var VerboseReverseMapping = map[Verbose]string{ QUIET: "quiet", CRITICAL: "critical", ERROR: "error", WARNING: "warning", INFO: "info", REQUEST: "request", DEBUG: "debug", }
VerboseReverseMapping is the translation between the verbosity type and the verbose common name
Functions ¶
func Logln ¶
Logln is the base function used for logging, allowing custom prefix and caller skip, logs are not formatted, and a new line will be append
func SetOutputFile ¶
SetOutputFile set logging to a file instead of the old logger output
Types ¶
Click to show internal directories.
Click to hide internal directories.