emit-rs / emit

Developer-first diagnostics for Rust applications
https://emit-rs.io
Apache License 2.0
128 stars 2 forks source link

Support custom levels in level filters #118

Closed KodrAus closed 4 weeks ago

KodrAus commented 2 months ago

Since emit doesn't hard-code its levels, we could support custom levels in the LeveLFilter-style filters by making them generic over L: FromValue + Ord. We'd still default to L = Level, but that would let users define their own level scheme and use it. We could also make the field we pull the level from configurable too, defaulting to lvl. At this point the level filters are really just a generic ThresholdFilter.