1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-01-07 23:02:12 +02:00
kratos/log/std_test.go
Tony Chen d78eb3ee4b
log: add level printer (#918)
* add level printer

* fix helper args

* fix test

* Update README.md
2021-05-17 16:34:28 +08:00

14 lines
340 B
Go

package log
import "testing"
func TestStdLogger(t *testing.T) {
logger := DefaultLogger
logger = With(logger, "caller", DefaultCaller, "ts", DefaultTimestamp)
logger.Log(LevelInfo, "msg", "test debug")
logger.Log(LevelInfo, "msg", "test info")
logger.Log(LevelInfo, "msg", "test warn")
logger.Log(LevelInfo, "msg", "test error")
}