Skip to content

Commit

Permalink
fix(aliyun log): 'format bool' is missing in 'toString' function (#2406)
Browse files Browse the repository at this point in the history
  • Loading branch information
pig-peppa authored Sep 27, 2022
1 parent 2170a12 commit 8d067a3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions contrib/log/aliyun/aliyun.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 4 additions & 0 deletions contrib/log/aliyun/aliyun_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

0 comments on commit 8d067a3

Please sign in to comment.