Skip to content

Log error.Error with Any values in JSON#24

Open
joeriddles wants to merge 4 commits intojordan-rash:mainfrom
joeriddles:log-any-errors-with-json
Open

Log error.Error with Any values in JSON#24
joeriddles wants to merge 4 commits intojordan-rash:mainfrom
joeriddles:log-any-errors-with-json

Conversation

@joeriddles
Copy link
Copy Markdown

Currently if you log an error with slog.Any("err", err), it prints as "err": {}. This updates the JSON handler logic to unwrap errors and print them as strings.

@joeriddles joeriddles changed the title Log any errors with json Log error.Error with Any values in JSON Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant