Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
subscriber: set
log
max level when reloading (#1270)
This modifies the `tracing_subscriber::reload` layer to also set the `log` crate's max level with the current max `tracing` level filter after reloading. If reloading the subscriber caused the max `tracing` level to change, this ensures that the change is propagated to the `log` crate as well. In the case where the max level was made more verbose, this will ensure that `log` records which were previously disabled are enabled correctly; in the case where it was made less verbose, this improve performance by not having to perfrom more costly filtering for those `log` records. The `log` max level is set only after rebuilding the callsite interest cache, which is what sets the max `tracing` level filter. This ensures that we pass the latest state to the `log` crate. Signed-off-by: Eliza Weisman <[email protected]>
- Loading branch information