go_goutils/logging/consts_linux.go

37 lines
878 B
Go
Raw Permalink Normal View History

package logging
import (
`log/syslog`
`r00t2.io/goutils/bitmask`
)
const (
2022-01-05 05:15:38 -05:00
// devlog is the path to the syslog char device.
devlog string = "/dev/log"
// syslogFacility is the facility to use; it's a little like a context or scope if you think of it in those terms.
syslogFacility syslog.Priority = syslog.LOG_USER
)
2022-01-05 05:15:38 -05:00
// Flags for logger configuration. These are used internally.
const (
2022-01-05 05:15:38 -05:00
// LogUndefined indicates an undefined Logger type.
LogUndefined bitmask.MaskBit = 1 << iota
2022-01-05 05:15:38 -05:00
// LogJournald flags a SystemDLogger Logger type.
LogJournald
2022-01-05 05:15:38 -05:00
// LogSyslog flags a SyslogLogger Logger type.
LogSyslog
2022-01-05 05:15:38 -05:00
// LogFile flags a FileLogger Logger type.
LogFile
2022-01-05 05:15:38 -05:00
// LogStdout flags a StdLogger Logger type.
LogStdout
)
var (
2022-01-05 05:15:38 -05:00
// defLogPaths indicates default log paths.
defLogPaths = []string{
"/var/log/golang/program.log",
"~/.local/log/golang/program.log",
}
)