diff --git a/contrib/log/aliyun/aliyun.go b/contrib/log/aliyun/aliyun.go index 1be5f764c..a20d9ab69 100644 --- a/contrib/log/aliyun/aliyun.go +++ b/contrib/log/aliyun/aliyun.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: diff --git a/contrib/log/aliyun/aliyun_test.go b/contrib/log/aliyun/aliyun_test.go index 1ceafc324..d7acf6bbd 100644 --- a/contrib/log/aliyun/aliyun_test.go +++ b/contrib/log/aliyun/aliyun_test.go @@ -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) + } }