mirror of
https://github.com/DNSCrypt/dnscrypt-proxy.git
synced 2025-04-06 06:37:36 +03:00
Update dlog
This commit is contained in:
parent
6e1eaf7b90
commit
fd9291b240
3 changed files with 8 additions and 12 deletions
10
vendor/github.com/jedisct1/dlog/dlog.go
generated
vendored
10
vendor/github.com/jedisct1/dlog/dlog.go
generated
vendored
|
@ -185,17 +185,15 @@ func logf(severity Severity, format string, args ...interface{}) {
|
|||
defer _globals.Unlock()
|
||||
if *_globals.useSyslog && _globals.systemLogger == nil {
|
||||
systemLogger, err := newSystemLogger(_globals.appName, _globals.syslogFacility)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
if err == nil {
|
||||
_globals.systemLogger = systemLogger
|
||||
}
|
||||
_globals.systemLogger = systemLogger
|
||||
}
|
||||
if _globals.fileName != nil && len(*_globals.fileName) > 0 && _globals.outFd == nil {
|
||||
outFd, err := os.OpenFile(*_globals.fileName, os.O_WRONLY|os.O_APPEND|os.O_CREATE, 0644)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
if err == nil {
|
||||
_globals.outFd = outFd
|
||||
}
|
||||
_globals.outFd = outFd
|
||||
}
|
||||
if _globals.systemLogger != nil {
|
||||
(*_globals.systemLogger).writeString(severity, message)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue