Drakulix / simplelog.rs

Simple Logging Facility for Rust
https://docs.rs/simplelog/
Apache License 2.0
424 stars 71 forks source link

Setting config thread level to 'Off' enables all levels #43

Closed spearman closed 5 years ago

spearman commented 5 years ago

I think there is something wrong with the level comparison in the new config. Previously I would set thread to 'None' to disable logging the thread number for all levels. Setting it to 'Off' with the config builder seems to enable it for all levels

Drakulix commented 5 years ago

As yes, this arises from unintended usage of LevelFilter in my code.

Usually LevelFilter is used to declare a maximum filter up to Trace, but I am using it the other way around (with Error being the maximum) because simplelog gets more verbose on more verbose levels. This results in Off being ordered wrong for this usecase.

v0.7.1 is released and contains a workaround, so it works as expected. Fixed by e39f088a5cb75a90b12e0012278a719dd40c01c2