mirror of
https://github.com/go-kratos/kratos.git
synced 2025-01-07 23:02:12 +02:00
d78eb3ee4b
* add level printer * fix helper args * fix test * Update README.md
14 lines
340 B
Go
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")
|
|
}
|