e5191383a7
ADDED: * logging.Logger objects now are able to return a stdlib *log.Logger.
28 lines
720 B
Go
28 lines
720 B
Go
package logging
|
|
|
|
import (
|
|
`os`
|
|
)
|
|
|
|
const (
|
|
// logPerm is the octal mode to use for testing the file.
|
|
logPerm os.FileMode = 0600
|
|
// logPrefix is the default log prefix.
|
|
logPrefix string = "GOLANG PROGRAM"
|
|
// appendFlags are the flags used for testing the file (and opening/writing).
|
|
appendFlags int = os.O_APPEND | os.O_CREATE | os.O_WRONLY
|
|
)
|
|
|
|
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
|