Documentation
¶
Index ¶
- Constants
- func Alert(format string, args ...interface{})
- func Crit(format string, args ...interface{})
- func Debug(format string, args ...interface{})
- func DisableTimestamp()
- func Emerg(format string, args ...interface{})
- func EnableTimestamp()
- func Err(format string, args ...interface{})
- func GetLogLevel(source string, altsource string) int
- func Info(format string, args ...interface{})
- func IsAlertEnabled() bool
- func IsCritEnabled() bool
- func IsDebugEnabled() bool
- func IsEmergEnabled() bool
- func IsErrEnabled() bool
- func IsInfoEnabled() bool
- func IsLogEnabled(level int) bool
- func IsLogEnabledSource(level int, source string) bool
- func IsNoticeEnabled() bool
- func IsTraceEnabled() bool
- func IsWarnEnabled() bool
- func LogFormatter(format string, args ...interface{}) string
- func LogMessage(level int, format string, args ...interface{})
- func LogMessageSource(level int, source string, format string, args ...interface{})
- func Notice(format string, args ...interface{})
- func Shutdown()
- func Startup()
- func Trace(format string, args ...interface{})
- func Warn(format string, args ...interface{})
- type LogWriter
Constants ¶
const LogLevelAlert = 1
LogLevelAlert = stdlog.h/LOG_ALERT
const LogLevelCrit = 2
LogLevelCrit = stdlog.h/LOG_CRIT
const LogLevelDebug = 7
LogLevelDebug = stdlog.h/LOG_DEBUG
const LogLevelEmerg = 0
LogLevelEmerg = stdlog.h/LOG_EMERG
const LogLevelErr = 3
LogLevelErr = stdlog.h/LOG_ERR
const LogLevelInfo = 6
LogLevelInfo = stdlog.h/LOG_INFO
const LogLevelNotice = 5
LogLevelNotice = stdlog.h/LOG_NOTICE
const LogLevelTrace = 8
LogLevelTrace = custom value
const LogLevelWarn = 4
LogLevelWarn = stdlog.h/LOG_WARNING
Variables ¶
This section is empty.
Functions ¶
func Alert ¶
func Alert(format string, args ...interface{})
Alert is called for log level ALERT messages
func Crit ¶
func Crit(format string, args ...interface{})
Crit is called for log level CRIT messages
func Debug ¶
func Debug(format string, args ...interface{})
Debug is called for log level DEBUG messages
func DisableTimestamp ¶ added in v0.1.2
func DisableTimestamp()
DisableTimestamp disable the elapsed time in output
func Emerg ¶
func Emerg(format string, args ...interface{})
Emerg is called for log level EMERG messages
func EnableTimestamp ¶ added in v0.1.2
func EnableTimestamp()
EnableTimestamp enables the elapsed time in output
func GetLogLevel ¶ added in v0.1.2
GetLogLevel returns the log level for the specified source(s) it uses altsource only if a specification for source is not found
func Info ¶
func Info(format string, args ...interface{})
Info is called for log level INFO messages
func IsAlertEnabled ¶
func IsAlertEnabled() bool
IsAlertEnabled returns true if ALERT logging is enable for the caller
func IsCritEnabled ¶
func IsCritEnabled() bool
IsCritEnabled returns true if CRIT logging is enable for the caller
func IsDebugEnabled ¶
func IsDebugEnabled() bool
IsDebugEnabled returns true if DEBUG logging is enable for the caller
func IsEmergEnabled ¶
func IsEmergEnabled() bool
IsEmergEnabled returns true if EMERG logging is enable for the caller
func IsErrEnabled ¶
func IsErrEnabled() bool
IsErrEnabled returns true if ERR logging is enable for the caller
func IsInfoEnabled ¶
func IsInfoEnabled() bool
IsInfoEnabled returns true if INFO logging is enable for the caller
func IsLogEnabled ¶
IsLogEnabled returns true if logging is enabled for the caller at the specified level, false otherwise
func IsLogEnabledSource ¶ added in v0.1.2
IsLogEnabledSource is the same as IsLogEnabled but for the manually specified source
func IsNoticeEnabled ¶
func IsNoticeEnabled() bool
IsNoticeEnabled returns true if NOTICE logging is enable for the caller
func IsTraceEnabled ¶
func IsTraceEnabled() bool
IsTraceEnabled returns true if TRACE logging is enable for the caller
func IsWarnEnabled ¶
func IsWarnEnabled() bool
IsWarnEnabled returns true if WARN logging is enable for the caller
func LogFormatter ¶ added in v0.1.2
LogFormatter creats a log message using the format and arguments provided We look for and handle special format verbs that trigger additional processing
func LogMessage ¶
LogMessage is called to write messages to the system log
func LogMessageSource ¶
LogMessageSource is similar to LogMessage except instead of using runtime to determine the caller/source the source is specified manually
func Notice ¶
func Notice(format string, args ...interface{})
Notice is called for log level NOTICE messages
Types ¶
type LogWriter ¶
type LogWriter struct {
// contains filtered or unexported fields
}
LogWriter is used to send an output stream to the Log facility
func NewLogWriter ¶
func NewLogWriter() *LogWriter
NewLogWriter creates an io Writer to steam output to the Log facility