|
|
@ -115,7 +115,7 @@ func NewLogger(options ...Option) (Logger, error) { |
|
|
|
}, nil |
|
|
|
}, nil |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// toString any type to string
|
|
|
|
// toString convert any type to string
|
|
|
|
func toString(v interface{}) string { |
|
|
|
func toString(v interface{}) string { |
|
|
|
var key string |
|
|
|
var key string |
|
|
|
if v == nil { |
|
|
|
if v == nil { |
|
|
@ -146,6 +146,12 @@ func toString(v interface{}) string { |
|
|
|
key = strconv.FormatInt(v, 10) |
|
|
|
key = strconv.FormatInt(v, 10) |
|
|
|
case uint64: |
|
|
|
case uint64: |
|
|
|
key = strconv.FormatUint(v, 10) |
|
|
|
key = strconv.FormatUint(v, 10) |
|
|
|
|
|
|
|
case string: |
|
|
|
|
|
|
|
key = v |
|
|
|
|
|
|
|
case bool: |
|
|
|
|
|
|
|
key = strconv.FormatBool(v) |
|
|
|
|
|
|
|
case []byte: |
|
|
|
|
|
|
|
key = string(v) |
|
|
|
case fmt.Stringer: |
|
|
|
case fmt.Stringer: |
|
|
|
key = v.String() |
|
|
|
key = v.String() |
|
|
|
default: |
|
|
|
default: |
|
|
|