softprops / json-env-logger

A structured JSON logger for Rust.
MIT License
30 stars 13 forks source link

Support for logging serde_json::Value #3

Open jakejscott opened 4 years ago

jakejscott commented 4 years ago

@softprops Hey wondering if there's a way to be able to log serde_json::Value as JSON and not stringify it?

softprops commented 4 years ago

It's on my to-do list to followup on this but the tldr here is to think about layers

The log library is providing the structured log API.

The macro lib in this projects readme is providing macros that will eventually get merged into log

And then this lib doesn't do anything more that provide a standard logger impl that takes that record data and serialize it with serde json

And open log issue worth tracking is

https://github.com/rust-lang/log/issues/388

softprops commented 4 years ago

Here's an aggregate gh issue that's tracking a bunch of stabilization changes https://github.com/rust-lang/log/issues/328

jakejscott commented 4 years ago

No problem, thanks for letting me know. I assumed as much I think from a comment you had in the code :)