feat: prefer json.Marshaler over fmt.Stringer for JSON log output whe… (#5117)

This commit is contained in:
Qiying Wang
2025-08-31 17:06:25 +08:00
committed by GitHub
parent 955b8016aa
commit de42f27e03
2 changed files with 48 additions and 0 deletions

View File

@@ -422,6 +422,8 @@ func processFieldValue(value any) any {
times = append(times, fmt.Sprint(t))
}
return times
case json.Marshaler:
return val
case fmt.Stringer:
return encodeStringer(val)
case []fmt.Stringer: