mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-12-18 05:41:55 +03:00
ae8de95d89
Merge in DNS/adguard-home from 2234-move-to-internal to master Squashed commit of the following: commit d26a288cabeac86f9483fab307677b1027c78524 Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Oct 30 12:44:18 2020 +0300 * all: move internal Go packages to internal/ Closes #2234.
19 lines
325 B
Go
19 lines
325 B
Go
// +build !windows,!nacl,!plan9
|
|
|
|
package util
|
|
|
|
import (
|
|
"log"
|
|
"log/syslog"
|
|
)
|
|
|
|
// ConfigureSyslog reroutes standard logger output to syslog
|
|
func ConfigureSyslog(serviceName string) error {
|
|
w, err := syslog.New(syslog.LOG_NOTICE|syslog.LOG_USER, serviceName)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
log.SetOutput(w)
|
|
return nil
|
|
}
|