The syslog package is an event handler responsible for sending events to syslog.
const ( KERN facility = iota << 3 USER MAIL DAEMON AUTH SYSLOG LPR NEWS UUCP CRON AUTHPRIV FTP LOCAL0 LOCAL1 LOCAL2 LOCAL3 LOCAL4 LOCAL5 LOCAL6 LOCAL7 )
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.
Event accepts an event and writes it out to the syslog daemon. If the connection was lost, the function will attempt to reconnect once.