Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(log): support customization of log json marshal #18429

Merged
merged 13 commits into from
Nov 12, 2023
Prev Previous commit
Next Next commit
Update logger.go
  • Loading branch information
lilasxie authored Nov 11, 2023
commit 9fcb000d14e8a0e4acdba7035e9de43411a2aeb7
2 changes: 1 addition & 1 deletion log/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
)

func init() {
zerolog.InterfaceMarshalFunc = func(i interface{}) ([]byte, error) {
zerolog.InterfaceMarshalFunc = func(i any) ([]byte, error) {
switch v := i.(type) {
case fmt.Stringer:
return json.Marshal(v.String())
Expand Down