summaryrefslogtreecommitdiff
path: root/cryptfs/log_go1.5.go
blob: 8daae9c74dd0cffaa1300460224b62345b3659c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// +build go1.5
// = go 1.5 or higher

package cryptfs

import (
	"log/syslog"
)

func (l *toggledLogger) SwitchToSyslog(p syslog.Priority) {
	w, err := syslog.New(p, PROGRAM_NAME)
	if err != nil {
		Warn.Printf("Cannot switch 0x%02x to syslog: %v", p, err)
	} else {
		l.SetOutput(w)
	}
}