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

pull/2408/head
swliao425 2 years ago committed by GitHub
parent 2170a12aa4
commit 8d067a32db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      contrib/log/aliyun/aliyun.go
  2. 4
      contrib/log/aliyun/aliyun_test.go

@ -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…
Cancel
Save