From e84f7bd810922e9bf15f52d675114e65616a3cf1 Mon Sep 17 00:00:00 2001 From: Rene Nochebuena Date: Thu, 10 Apr 2025 10:00:55 -0600 Subject: [PATCH] Add test for muted plaintext log behavior 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. --- log_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/log_test.go b/log_test.go index 64442fa..fb83b29 100644 --- a/log_test.go +++ b/log_test.go @@ -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")