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:
parent
2170a12aa4
commit
8d067a32db
@ -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:
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user