1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-01-14 02:33:03 +02:00

fix(aliyun log): 'format bool' is missing in 'toString' function (#2406)

This commit is contained in:
swliao425 2022-09-27 12:19:21 +08:00 committed by GitHub
parent 2170a12aa4
commit 8d067a32db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -159,6 +159,8 @@ func toString(v interface{}) string {
key = strconv.FormatUint(v, 10)
case string:
key = v
case bool:
key = strconv.FormatBool(v)
case []byte:
key = string(v)
default:

View File

@ -92,4 +92,8 @@ func TestLog(t *testing.T) {
if err != nil {
t.Errorf("Log() returns error:%v", err)
}
err = logger.Log(log.LevelDebug, true, 0)
if err != nil {
t.Errorf("Log() returns error:%v", err)
}
}