40 lines
1.5 KiB
Go
40 lines
1.5 KiB
Go
package logging
|
|
|
|
import (
|
|
`log`
|
|
)
|
|
|
|
/*
|
|
The following are strings written to the Logger in the various tests.
|
|
The %v is populated with the name of the type of Logger.
|
|
*/
|
|
const (
|
|
testAlert string = "This is a test ALERT-priority log message for logger %v."
|
|
testCrit string = "This is a test CRITICAL-priority (CRIT) log message for logger %v."
|
|
testDebug string = "This is a test DEBUG-priority log message for logger %v."
|
|
testEmerg string = "This is a test EMERGENCY-priority (EMERG) log message for logger %v."
|
|
testErr string = "This is a test ERROR-priority (ERR) log message for logger %v."
|
|
testInfo string = "This is a test INFO-priority log message for logger %v."
|
|
testNotice string = "This is a test NOTICE-priority log message for logger %v."
|
|
testWarning string = "This is a test WARNING-priority log message for logger %v."
|
|
)
|
|
|
|
// Prefixes to use for tests.
|
|
const (
|
|
// TestLogPrefix is used as the initial prefix.
|
|
TestLogPrefix string = "LOGGING_TESTRUN"
|
|
// TestLogAltPrefix is used as the alternative prefix to Logger.SetPrefix.
|
|
TestLogAltPrefix string = "LOGGING_TESTRUN_ALT"
|
|
)
|
|
|
|
const (
|
|
// EnvVarKeepLog is the env var key/var name to use to suppress removal of FileLogger.Path after tests complete.
|
|
EnvVarKeepLog string = "LOGGING_KEEP_TEMPLOG"
|
|
)
|
|
|
|
const (
|
|
// logFlags are used to set the log flags for StdLogger (and FileLogger.StdLogger).
|
|
// logFlags int = log.Ldate | log.Lmicroseconds | log.Llongfile | log.LUTC
|
|
logFlags int = log.Ldate | log.Lmicroseconds | log.Lshortfile | log.LUTC
|
|
)
|