Documentation ¶
Overview ¶
The syslog package is an event handler responsible for sending events to syslog.
Index ¶
Constants ¶
const ( EMERG level = iota ALERT CRIT ERR WARN NOTICE INFO DEBUG )
const ( KERN facility = iota << 3 USER MAIL DAEMON AUTH SYSLOG LPR NEWS UUCP CRON AUTHPRIV FTP LOCAL0 LOCAL1 LOCAL2 LOCAL3 LOCAL4 LOCAL5 LOCAL6 LOCAL7 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SyslogHandler ¶
func New ¶
func New(protocol string, addr string, facility facility, templateString string) (*SyslogHandler, error)
New attempts to connect to syslog, and returns a new SyslogHandler if successful.
protocol is a "network" as defined by the net package. Commonly either "unix" or "unixgram". See net.Dial for available values. Defaults to "unix" if emtpy.
addr is the address where to reach the syslog daemon. Also see net.Dial. If empty, "/dev/log", "/var/run/syslog", and "/var/run/log" are tried.
facility is the syslog facility to use for all events processed through this handler. Defaults to USER.
templateString is the sawmill/event/formatter compatable template to use for formatting events. Defaults to formatter.SIMPLE_FORMAT.