AdGuardHome/home/syslog_others.go

19 lines
307 B
Go
Raw Normal View History

// +build !windows,!nacl,!plan9
package home
import (
"log"
"log/syslog"
)
// configureSyslog reroutes standard logger output to syslog
func configureSyslog() error {
2019-02-05 14:21:07 +03:00
w, err := syslog.New(syslog.LOG_NOTICE|syslog.LOG_USER, serviceName)
if err != nil {
return err
}
log.SetOutput(w)
return nil
}