Add tests for handling invalid log levels in SetLogLevel
All checks were successful
Go CI/CD / go-ci (push) Successful in 10m4s
All checks were successful
Go CI/CD / go-ci (push) Successful in 10m4s
Ensure that setting an invalid log level with SetLogLevel does not affect existing log behavior. Additional test cases verify that only appropriate log messages are displayed based on the current log level.
This commit is contained in:
parent
e84f7bd810
commit
b7202bc141
@ -59,10 +59,17 @@ func Test_PlainTextLogs(t *testing.T) {
|
||||
|
||||
func Test_MutedPlainTextLogs(t *testing.T) {
|
||||
InitStoneLog(ERROR, false, true)
|
||||
|
||||
// This won't change the log level
|
||||
SetLogLevel(-1)
|
||||
|
||||
// Following won't appear
|
||||
Trace("This is a trace log")
|
||||
Debug("This is a debug log")
|
||||
Observation("This is an observation log")
|
||||
Hypothesis("This is a hypothesis log")
|
||||
|
||||
// Until this one
|
||||
Failure("This is a failure log")
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user