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
Logging a SerdeValue panics when the drain doesn't support nested-values #232
Comments
I've also found that I have no trouble serializing let my_string = MyString("testing".into());
let serde_value = my_string.as_serde();
let string = serde_json::to_string(serde_value).unwrap(); |
Aha, so it seems Drains need to explicitly support Is there a way to log a |
As far as I can see, |
I wonder if there's a way to make your program not type check when you log a |
Hello!
I'm deriving
SerdeValue
for a struct, and I've got the project building. But when I try to log it out, I get a panic looking like this:https://gist.github.com/atroche/2db3b55ffa4eea524b2f7a5fbdb164c4
I've tried it with three different drains:
slog_term::CompactFormat
,slog::json::Json
andslog_loggly::LogglyDrain
, all to the same effect.I've set up a project which is as close to a minimal failing example as I can get:
https://github.com/atroche/try_slog_serde_derive/blob/master/src/main.rs
This is the core of it:
Am I doing something wrong?
Cheers!
The text was updated successfully, but these errors were encountered: