1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-01-28 03:57:02 +02:00
kratos/log/log_test.go
Kagaya f7588a47de
fix: ci lint error (#1391)
* fix lint check

* fix lll lint error

* fix build error

* fix gomnd

* fix shadow declaration

* add make test command

* update
2021-08-31 10:14:57 +08:00

21 lines
437 B
Go

package log
import (
"os"
"testing"
)
func TestInfo(t *testing.T) {
logger := DefaultLogger
logger = With(logger, "ts", DefaultTimestamp, "caller", DefaultCaller)
_ = logger.Log(LevelInfo, "key1", "value1")
}
func TestWrapper(t *testing.T) {
out := NewStdLogger(os.Stdout)
err := NewStdLogger(os.Stderr)
l := With(MultiLogger(out, err), "ts", DefaultTimestamp, "caller", DefaultCaller)
_ = l.Log(LevelInfo, "msg", "test")
}