Documentation ¶
Index ¶
- Constants
- func Critical(message string, args ...interface{}) error
- func Criticale(err error) error
- func Criticalf(message string, args ...interface{}) error
- func Debug(message string, args ...interface{}) string
- func Debugf(message string, args ...interface{}) string
- func EnableSyslogWriter(tag string) (err error)
- func Error(message string, args ...interface{}) error
- func Errore(err error) error
- func Errorf(message string, args ...interface{}) error
- func Fatal(message string, args ...interface{}) error
- func Fatale(err error) error
- func Fatalf(message string, args ...interface{}) error
- func Info(message string, args ...interface{}) string
- func Infof(message string, args ...interface{}) string
- func Notice(message string, args ...interface{}) string
- func Noticef(message string, args ...interface{}) string
- func SetLevel(logLevel LogLevel)
- func SetPrintStackTrace(shouldPrintStackTrace bool)
- func SetSyslogLevel(logLevel LogLevel)
- func Warning(message string, args ...interface{}) error
- func Warningf(message string, args ...interface{}) error
- type LogLevel
Constants ¶
View Source
const TimeFormat = "2006-01-02 15:04:05"
Variables ¶
This section is empty.
Functions ¶
func EnableSyslogWriter ¶
EnableSyslogWriter enables, if possible, writes to syslog. These will execute _in addition_ to normal logging
func SetLevel ¶
func SetLevel(logLevel LogLevel)
SetLevel sets the global log level. Only entries with level equals or higher than this value will be logged
func SetPrintStackTrace ¶
func SetPrintStackTrace(shouldPrintStackTrace bool)
SetPrintStackTrace enables/disables dumping the stack upon error logging
func SetSyslogLevel ¶
func SetSyslogLevel(logLevel LogLevel)
SetSyslogLevel sets the minimal syslog level. Only entries with level equals or higher than this value will be logged. However, this is also capped by the global log level. That is, messages with lower level than global-log-level will be discarded at any case.
Types ¶
type LogLevel ¶
type LogLevel int
LogLevel indicates the severity of a log entry
func LogLevelFromString ¶
Click to show internal directories.
Click to hide internal directories.