🎨 start v3
This commit is contained in:
17
logger/ctx_test.go
Normal file
17
logger/ctx_test.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package logger
|
||||
|
||||
import (
|
||||
"context"
|
||||
"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()
|
||||
ctx = context.WithValue(ctx, TraceId, "value")
|
||||
SetLogLevel(LogLevelDebug)
|
||||
DebugCtx(ctx, "hello %s", "world")
|
||||
ErrorCtx(ctx, "hello %s", "world")
|
||||
}
|
||||
Reference in New Issue
Block a user