1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-01-14 02:33:03 +02:00
kratos/log/std_test.go

18 lines
452 B
Go
Raw Normal View History

2021-02-17 11:14:47 +02:00
package log
import "testing"
func TestStdLogger(t *testing.T) {
logger := DefaultLogger
logger = With(logger, "caller", DefaultCaller, "ts", DefaultTimestamp)
2021-02-17 11:14:47 +02:00
_ = logger.Log(LevelInfo, "msg", "test debug")
_ = logger.Log(LevelInfo, "msg", "test info")
_ = logger.Log(LevelInfo, "msg", "test warn")
_ = logger.Log(LevelInfo, "msg", "test error")
_ = logger.Log(LevelDebug, "singular")
logger2 := DefaultLogger
_ = logger2.Log(LevelDebug)
2021-02-17 11:14:47 +02:00
}