-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Handle JSON func values #835
base: master
Are you sure you want to change the base?
Conversation
Leave func handling up to the formatter.
Errors can be handled field by field.
Hello @zachbadgett, thanks for your contribution, but I'm not sure if it's better to handle that at the formatter level rather than the Entry level. |
IMO, which types to support would best to be left to the formatter. If a user wants to implement a custom formatter and wants to support grabbing details from a custom function in their application then they can. Either way, I believe you should either move all normalization to the entry (which includes the error to string) or keep it all on the formatter. |
IMO It's kind of different, an error can be stringified. The fact that the json formatter can't is an implementation detail of the json formatter. |
Kind of a silly example if someone really wanted to get information on a func: https://play.golang.org/p/zJiQT7AF-ni |
Leave func handling up to the formatter.