Documentation
¶
Overview ¶
Package syslog provides a minimal portability wrapper around the Go log/syslog package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotImplemented = errors.New("no syslog on this platform")
)
Functions ¶
func NewLogger ¶
NewLogger creates a log.Logger whose output is written to the system log service with the specified priority, a combination of the syslog facility and severity. The logFlag argument is the flag set passed through to log.New to create the Logger. If syslog is not available on this platform then ErrNotImplemented is returned.
Types ¶
type Priority ¶
type Priority int
The Priority is a combination of the syslog facility and severity. For example, LOG_ALERT | LOG_FTP sends an alert severity message from the FTP facility. The default severity is LOG_EMERG; the default facility is LOG_KERN.
const ( // From /usr/include/sys/syslog.h. // These are the same up to LOG_FTP on Linux, BSD, and OS X. LOG_KERN Priority = iota << 3 LOG_USER LOG_MAIL LOG_DAEMON LOG_AUTH LOG_SYSLOG LOG_LPR LOG_NEWS LOG_UUCP LOG_CRON LOG_AUTHPRIV LOG_FTP LOG_LOCAL0 LOG_LOCAL1 LOG_LOCAL2 LOG_LOCAL3 LOG_LOCAL4 LOG_LOCAL5 LOG_LOCAL6 LOG_LOCAL7 )
Click to show internal directories.
Click to hide internal directories.