packages/logger/ctx_test.go
zhaoyupeng 4eb256bc78 🎉
2025-06-12 14:12:16 +08:00

16 lines
326 B
Go

package logger
import (
"context"
"gitea.loveuer.com/yizhisec/packages/opt"
"testing"
)
func TestCtxLog(t *testing.T) {
DebugCtx(nil, "hello %s", "world")
InfoCtx(nil, "hello %s", "world")
WarnCtx(context.Background(), "hello %s", "world")
ctx := context.Background()
context.WithValue(ctx, opt.TraceKey, "value")
}