Replies: 1 comment
-
Just found a related issue #2391 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
What I need is a JSON formatter that prints logs in a custom JSON schema / struct format.
There are some mandatory fields that should be set initially (e.g. environment such as test, prod) and printed out with every log entry without the need of specifying it in every log call (such as
info!("..")
) call. Some other fields are optional. Could I include optional fields withinfo!(key=value)
?I need some guidance how I should implement that. Is it a good idea to copy tracing's JSON Formatter (quite a bunch of code) and align it to my custom data structure or should I rather use a Layer (on top of the JSON Formatter?)?
Thanks for your input
Beta Was this translation helpful? Give feedback.
All reactions