Description
Bug Report
Version
0.1.16, seems to be no different on master
Platform
Linux 4.19.0-xilinx #2 SMP PREEMPT Wed Jul 22 19:10:58 CEST 2020 armv7l GNU/Linux
Description
I was surprised by hyper emitting Trace
level logs in conjunction with the syslog crate, while the level filter was set to Info
. This turned out to be caused by hyper using the tracing crate instead of the log crate directly. In particular log::max_level()
seems to be ignored.
In tracing/macros.rs
tracing_log!()
computes whether to log differently from the log crate.
While the log crate checks for lvl <= log::STATIC_MAX_LEVEL && lvl <= log::max_level()
, tracing instead checks for lvl <= log::STATIC_MAX_LEVEL
and later the output of logger.enabled()
. This causes differences in what is being logged including unexpected log output.