Documentation
¶
Index ¶
Constants ¶
View Source
const ModuleSystem = "System"
Variables ¶
View Source
var ( Error = log.Error Errorf = log.Errorf Info = log.Info Infof = log.Infof Warning = log.Warning Warningf = log.Warningf Fatal = log.Fatal Fatalf = log.Fatalf Debug = log.Debug Debugf = log.Debugf IsDebug = log.IsEnabledFor(logging.DEBUG) )
Functions ¶
Types ¶
type SyslogBackend ¶
SyslogBackend is a simple logger to syslog backend. It automatically maps the internal log levels to appropriate syslog log levels.
func NewSyslogBackend ¶
func NewSyslogBackend(prefix string, syslogaddr string, priority syslog.Priority) (b *SyslogBackend, err error)
NewSyslogBackend connects to the syslog daemon using UNIX sockets with the given prefix. If prefix is not given, the prefix will be derived from the launched command.
func NewSyslogBackendPriority ¶
func NewSyslogBackendPriority(prefix string, priority syslog.Priority) (b *SyslogBackend, err error)
NewSyslogBackendPriority is the same as NewSyslogBackend, but with custom syslog priority, like syslog.LOG_LOCAL3|syslog.LOG_DEBUG etc.
func (*SyslogBackend) Log ¶
func (b *SyslogBackend) Log(level logging.Level, calldepth int, rec *logging.Record) error
Log implements the Backend interface.
Click to show internal directories.
Click to hide internal directories.