mirror of
https://github.com/go-kratos/kratos.git
synced 2025-01-28 03:57:02 +02:00
f7588a47de
* fix lint check * fix lll lint error * fix build error * fix gomnd * fix shadow declaration * add make test command * update
21 lines
437 B
Go
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")
|
|
}
|