@@ -28,7 +28,9 @@ import (
2828 dubbogoLogger "github.com/dubbogo/gost/log/logger"
2929
3030 "github.com/sirupsen/logrus"
31+
3132 "github.com/stretchr/testify/assert"
33+ "github.com/stretchr/testify/require"
3234
3335 "go.opentelemetry.io/otel/sdk/trace"
3436)
@@ -54,9 +56,9 @@ func TestLogrusCtxLogger_CtxInfof_WithTrace(t *testing.T) {
5456 ctxLogger .CtxInfof (ctx , "test message" )
5557
5658 // Parse log output
57- var logEntry map [string ]interface {}
59+ var logEntry map [string ]any
5860 err := json .Unmarshal (buf .Bytes (), & logEntry )
59- assert .NoError (t , err )
61+ require .NoError (t , err )
6062
6163 // Verify log contains message
6264 assert .Equal (t , "test message" , logEntry ["msg" ])
@@ -82,9 +84,9 @@ func TestLogrusCtxLogger_CtxInfof_WithoutTrace(t *testing.T) {
8284 ctx := context .Background ()
8385 ctxLogger .CtxInfof (ctx , "test message" )
8486
85- var logEntry map [string ]interface {}
87+ var logEntry map [string ]any
8688 err := json .Unmarshal (buf .Bytes (), & logEntry )
87- assert .NoError (t , err )
89+ require .NoError (t , err )
8890
8991 // Verify log contains message but no trace fields
9092 assert .Equal (t , "test message" , logEntry ["msg" ])
0 commit comments