2021-02-26 15:52:29 -05:00
|
|
|
package logging
|
|
|
|
|
|
|
|
import (
|
|
|
|
`os`
|
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
2022-01-05 05:15:38 -05:00
|
|
|
// logPerm is the octal mode to use for testing the file.
|
2021-02-26 15:52:29 -05:00
|
|
|
logPerm os.FileMode = 0600
|
2022-01-05 05:15:38 -05:00
|
|
|
// logPrefix is the default log prefix.
|
2021-02-26 20:27:35 -05:00
|
|
|
logPrefix string = "GOLANG PROGRAM"
|
2022-01-05 05:15:38 -05:00
|
|
|
// appendFlags are the flags used for testing the file (and opening/writing).
|
|
|
|
appendFlags int = os.O_APPEND | os.O_CREATE | os.O_WRONLY
|
2021-02-26 15:52:29 -05:00
|
|
|
)
|
2024-06-19 18:57:26 -04:00
|
|
|
|
|
|
|
const PriorityNone logPrio = 0
|
|
|
|
const (
|
|
|
|
PriorityEmergency logPrio = 1 << iota
|
|
|
|
PriorityAlert
|
|
|
|
PriorityCritical
|
|
|
|
PriorityError
|
|
|
|
PriorityWarning
|
|
|
|
PriorityNotice
|
|
|
|
PriorityInformational
|
|
|
|
PriorityDebug
|
|
|
|
)
|
|
|
|
const PriorityAll logPrio = PriorityEmergency | PriorityAlert | PriorityCritical | PriorityError | PriorityWarning | PriorityNotice | PriorityInformational | PriorityDebug
|