Open tazz4843 opened 1 year ago
Hey, sorry for the late reply. I wasn't sure about this feature and had to think about it a while to get my bearings. I'm still not completely sure about it but would appreciate a PR for this behind a feature flag (maybe experimental or incubator). I see why this feature would help you (and probably also others).
Sorry this took me so long to get back to. I'll try to make that PR sometime in the next day, shouldn't be too hard to move it behind a feature flag.
So sorry, I completely missed your reply and your PR. I'll get back to merging it as soon as possible
What's your idea?
Before switching to this crate, I was using
tracing-loki
(which has its own whole host of issues which were originally the catalyst for me switching, but I digress). This crate output logs in a nicely formatted JSON manner, allowing me to filter logs incredibly easily using the JSON format. Sample output in the attached screenshot.When I switched to this crate I noticed I lost all of that, and wrote up a patch on my fork that I'm currently using: https://github.com/tazz4843/fenrir-rs/tree/json-logs
Given that this is a major change, and requires configuration on the user's part that way they don't end up with garbage logs, I figured I would open an issue before making a PR to add this feature if you're interested. It could be locked behind a feature flag if that's something you'd be willing to add.
Code of Conduct