1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-01-14 02:33:03 +02:00
kratos/log/log_test.go
Tony Chen 79497dd3a5
log: fix global logger (#2034)
* log: fix global logger
2022-05-24 00:40:45 +08:00

17 lines
301 B
Go

package log
import (
"context"
"testing"
)
func TestInfo(t *testing.T) {
logger := DefaultLogger
logger = With(logger, "ts", DefaultTimestamp, "caller", DefaultCaller)
_ = logger.Log(LevelInfo, "key1", "value1")
}
func TestWithContext(t *testing.T) {
WithContext(context.Background(), nil)
}