Fix log format bug

This commit is contained in:
Ming Deng
2021-02-05 22:26:52 +08:00
parent 62aa0188c4
commit 4855146ac6
5 changed files with 10 additions and 3 deletions

View File

@@ -41,4 +41,8 @@ func TestLogMsg_OldStyleFormat(t *testing.T) {
res = lg.OldStyleFormat()
assert.Equal(t, "[D] [/user/home/main.go:13] Cus Hello, world", res)
lg.Msg = "hello, %s"
lg.Args = []interface{}{"world"}
assert.Equal(t, "[D] [/user/home/main.go:13] Cus hello, world", lg.OldStyleFormat())
}