mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-11-26 06:55:48 +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.
18 lines
325 B
Go
18 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
|
|
}
|