do bitmask better, add (COMPLETELY 100% EXPERIMENTAL NOT DONE YET) eventlog support to logger

This commit is contained in:
2021-12-15 04:49:03 -05:00
parent d5b1d449e5
commit 3975f8b11f
17 changed files with 698 additions and 224 deletions

28
logging/consts_linux.go Normal file
View File

@@ -0,0 +1,28 @@
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",
}
)