badguardhome/internal/aghos/syslog_others.go

21 lines
322 B
Go
Raw Normal View History

// +build !windows,!plan9
//go:build !(windows || plan9)
package aghos
import (
"log/syslog"
"github.com/AdguardTeam/golibs/log"
)
func configureSyslog(serviceName string) error {
2019-02-05 11:21:07 +00:00
w, err := syslog.New(syslog.LOG_NOTICE|syslog.LOG_USER, serviceName)
if err != nil {
return err
}
log.SetOutput(w)
return nil
}