🎉
This commit is contained in:
15
logger/ctx_test.go
Normal file
15
logger/ctx_test.go
Normal 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")
|
||||
}
|
Reference in New Issue
Block a user