This commit is contained in:
zhaoyupeng
2025-06-12 14:12:16 +08:00
commit 4eb256bc78
21 changed files with 1135 additions and 0 deletions

15
logger/ctx_test.go Normal file
View File

@ -0,0 +1,15 @@
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")
}