libgocryptfs/internal/tlog/log_go1.5.go
Jakob Unterwurzacher 6c3f97399a Rename internal "toggledlog" package to "tlog"
tlog is used heavily everywhere and deserves a shorter name.

Renamed using sed magic, without any manual rework:

   find * -type f -exec sed -i 's/toggledlog/tlog/g' {} +
2016-06-15 23:30:44 +02:00

18 lines
286 B
Go

// +build go1.5
// = go 1.5 or higher
package tlog
import (
"log/syslog"
)
func (l *toggledLogger) SwitchToSyslog(p syslog.Priority) {
w, err := syslog.New(p, ProgramName)
if err != nil {
Warn.Printf("Cannot switch 0x%02x to syslog: %v", p, err)
} else {
l.SetOutput(w)
}
}