Hi, I'm currently trying to port a project from
tracing but I'm facing an issue.
we have this kind of log:
info!("some msg"; &kv);
kv being a wrapper around a HashMap that implements
slog::KV so the HashMap's keys become what would be a
Field in tracing's terminology and the values as
Looking around the doc, it seems that I would not be able to just pass the HashMap to the macro and I would need to add a field name? Something like this:
tracing::info!(map = &kv, "my msg");
Am I missing something?
I believe it should work if both the key and value of the hash map implement
Thanks for your answer!
Unfortunately, valuable is unstable, guess we'll stick with slog for now
Valuable is used by tracing. A new incompatible version of valuable will require a new incompatible version of tracing, which in turn requires a new major version of tokio. Given the stability guarantees of tokio (3 years after initial release before new major release, 5 years support) you can consider valuable pretty stable too.
My hierarchy will not be OK with this:
(and me neither )
By pure cusiosity, I made a test project to use valuable, but it seems that even with
String implements Valuable, it can't destructure the hashmap so each key-value pair becomes a
I see. Didn't realize it was an unstable feature.