From 2479a6f03376a8491c64ac4d152d55d89a48b130 Mon Sep 17 00:00:00 2001 From: Mostafa Moradian Date: Tue, 23 Apr 2024 23:24:59 +0200 Subject: [PATCH] Test hclog logging with different levels --- logging/hclog_adapter_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/logging/hclog_adapter_test.go b/logging/hclog_adapter_test.go index 731d08b0..7b6ff0e3 100644 --- a/logging/hclog_adapter_test.go +++ b/logging/hclog_adapter_test.go @@ -149,6 +149,8 @@ func TestNewHcLogAdapter_GetLevel(t *testing.T) { hcLogAdapter := NewHcLogAdapter(&logger, "test") hcLogAdapter.SetLevel(hclogLevel) + hcLogAdapter.With("key", "value").Log( + hclogLevel, "This is a trace message", "level", hcLogAdapter.GetLevel()) assert.Equal(t, hclogLevel, hcLogAdapter.GetLevel()) hcLogAdapter.SetLevel(hclog.Debug)