Add test for muted plaintext log behavior
Some checks failed
Go CI/CD / go-ci (push) Has been cancelled
Some checks failed
Go CI/CD / go-ci (push) Has been cancelled
This test verifies that logs below the ERROR level are properly muted when plaintext logging is enabled without JSON formatting. It ensures that log output adheres to the configured log level settings.
This commit is contained in:
parent
00e6488185
commit
e84f7bd810
@ -57,6 +57,15 @@ func Test_PlainTextLogs(t *testing.T) {
|
||||
SetLogLevel(INFO)
|
||||
}
|
||||
|
||||
func Test_MutedPlainTextLogs(t *testing.T) {
|
||||
InitStoneLog(ERROR, false, true)
|
||||
Trace("This is a trace log")
|
||||
Debug("This is a debug log")
|
||||
Observation("This is an observation log")
|
||||
Hypothesis("This is a hypothesis log")
|
||||
Failure("This is a failure log")
|
||||
}
|
||||
|
||||
func Test_JSONLogs(t *testing.T) {
|
||||
InitStoneLog(TRACE, true, false)
|
||||
Trace("This is a trace log")
|
||||
|
Loading…
x
Reference in New Issue
Block a user