Expose a way to serialize a KV with any Serde Serializer#18
Conversation
This is useful if you need to serialize to a more structured form, such as sending full JSON blobs to a HTTP endpoint.
|
Hey! I came here to file a ticket saying "make it easier to log inline JSON, i.e., serde structs as log values". Since there seems to be lots of conflicting information and questions about how to do this on the web (several threads in gitter, for example) I made https://github.com/ncalexan/slog-nested-values-example to work out what I needed to do. But I think your PR would do this and a little more. Is that correct? Can we get some discussion of this? I would definitely like to see an example and/or tests of this functionality, 'cuz it's not obvious that it exists without examples :) |
|
@ncalexan This PR is for dumping log messages into arbitrary Serde |
Ah, I see -- I misunderstood the role of |
|
So, do I close this one? |
|
@dpc Well, the PR is still relevant and exposes functionality that |
| homepage = "https://github.com/slog-rs/slog" | ||
| repository = "https://github.com/slog-rs/json" | ||
| readme = "README.md" | ||
| edition = "2018" |
There was a problem hiding this comment.
Do you think we can get away without it? Unless there's a really good reason, would rather not have these couple of folks stuck with older compiler or something, have to upgrade.
This is useful if you need to serialize to a more structured form, such as sending full JSON blobs to a HTTP endpoint.