29 lines
415 B
Go
29 lines
415 B
Go
|
package logging
|
||
|
|
||
|
import (
|
||
|
`log/syslog`
|
||
|
|
||
|
`r00t2.io/goutils/bitmask`
|
||
|
)
|
||
|
|
||
|
const (
|
||
|
devlog string = "/dev/log"
|
||
|
syslogFacility syslog.Priority = syslog.LOG_USER
|
||
|
)
|
||
|
|
||
|
// Flags for logger configuration
|
||
|
const (
|
||
|
LogUndefined bitmask.MaskBit = 1 << iota
|
||
|
LogJournald
|
||
|
LogSyslog
|
||
|
LogFile
|
||
|
LogStdout
|
||
|
)
|
||
|
|
||
|
var (
|
||
|
defLogPaths = []string{
|
||
|
"/var/log/golang/program.log",
|
||
|
"~/.local/log/golang/program.log",
|
||
|
}
|
||
|
)
|