micro/logger/logger_test.go
Vasiliy Tolstov 6dc7e792c8 logger improvements
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-11-10 22:18:16 +03:00

17 lines
313 B
Go

package logger
import (
"testing"
)
func TestLogger(t *testing.T) {
l := NewLogger(WithLevel(TraceLevel))
if err := l.Init(); err != nil {
t.Fatal(err)
}
l.Trace("trace_msg1")
l.Warn("warn_msg1")
l.Fields(map[string]interface{}{"error": "test"}).Info("error message")
l.Warn("first", " ", "second")
}