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