* move ./*.go files into ./home/ directory
This commit is contained in:
18
home/syslog_others.go
Normal file
18
home/syslog_others.go
Normal file
@@ -0,0 +1,18 @@
|
||||
// +build !windows,!nacl,!plan9
|
||||
|
||||
package home
|
||||
|
||||
import (
|
||||
"log"
|
||||
"log/syslog"
|
||||
)
|
||||
|
||||
// configureSyslog reroutes standard logger output to syslog
|
||||
func configureSyslog() error {
|
||||
w, err := syslog.New(syslog.LOG_NOTICE|syslog.LOG_USER, serviceName)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
log.SetOutput(w)
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user