davidbarsky / tracing-tree

Apache License 2.0
128 stars 31 forks source link

Subscriber: Debug #45

Closed conradludgate closed 2 years ago

conradludgate commented 2 years ago

Is there any reason why the HeirarchicalLayer needs the S: fmt::Debug bound? The code doesn't seem to use it anywhere

davidbarsky commented 2 years ago

I don't exactly recall, but if I'm pretty sure that HierarchicalLayer only implements has an S: fmt::Debug bound when it itself is also Debug. This mimics how tracing_subscriber::fmt::Layer does things, albeit with a slightly different declaration.

Is this giving you any issues?

conradludgate commented 2 years ago

Not directly, but it does make it harder to pair this layer with others that might not implement debug.

I think the debug requirement for Layer should be moved to the debug imply itself

davidbarsky commented 2 years ago

yeah, i'm not opposed to that change. i don't think that moving the debug implementation is a breaking change to a separate impl block, but i'll confirm.

davidbarsky commented 2 years ago

Resolved by #46.