-
Notifications
You must be signed in to change notification settings - Fork 741
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Events now unfiltered for fmt::writer::Boxed's MakeWriter impl #1694
Comments
Ah, I see what happened here. It looks like in commit 6cc6c47, which backported the change to add a lifetime parameter to this means that any filtering performed by the Fortunately, fixing this is as simple as...putting the method back. Should have it taken care of momentarily! |
## Motivation In `tracing-subscriber` 0.3.x, `MakeWriter` filtering seems to have stopped working when using the `BoxMakeWriter` wrapper to erase the type of a `MakeWriter` implementation. It looks like what happened is that commit 6cc6c47, which backported the change to add a lifetime parameter to `MakeWriter` (#781), I accidentally clobbered the `make_writer_for` method on the inner `Boxed` type, so that it only has `make_writer`: 6cc6c47#diff-c5dc275b15a60c1a2d4694da3797f4247c4f2e1e0978fd210dd14452d6746283L737-L739 This meant that any filtering performed by the `MakeWriter` inside the box is now ignored. My bad! ## Solution This commit puts back the missing `make_writer_for` method. Whoops! Fixes #1694
## Motivation In `tracing-subscriber` 0.3.x, `MakeWriter` filtering seems to have stopped working when using the `BoxMakeWriter` wrapper to erase the type of a `MakeWriter` implementation. It looks like what happened is that commit 6cc6c47, which backported the change to add a lifetime parameter to `MakeWriter` (#781), I accidentally clobbered the `make_writer_for` method on the inner `Boxed` type, so that it only has `make_writer`: 6cc6c47#diff-c5dc275b15a60c1a2d4694da3797f4247c4f2e1e0978fd210dd14452d6746283L737-L739 This meant that any filtering performed by the `MakeWriter` inside the box is now ignored. My bad! ## Solution This commit puts back the missing `make_writer_for` method. Whoops! Fixes #1694
Fixed by #1695! |
# 0.3.2 (Nov 19, 2021) ### Fixed - **fmt**: Fixed `MakeWriter` filtering not working with `BoxMakeWriter` ([#1694]) ### Added - **fmt**: `Writer::has_ansi_escapes` method to check if an output supports ANSI terminal formatting escape codes ([#1696]) - **fmt**: Added additional ANSI terminal formatting to field formatters when supported ([#1702]) - **fmt**: Added `FmtContext::span_scope`, `FmtContext::event_scope`, and `FmtContext::parent_span` methods for accessing the current span and its scope when formatting an event ([#1728]) - **fmt**: Improved documentation on implementing event formatters ([#1727]) [#1694]: #1694 [#1696]: #1696 [#1702]: #1702 [#1728]: #1728 [#1727]: #1727
…s#1695) ## Motivation In `tracing-subscriber` 0.3.x, `MakeWriter` filtering seems to have stopped working when using the `BoxMakeWriter` wrapper to erase the type of a `MakeWriter` implementation. It looks like what happened is that commit 6cc6c47, which backported the change to add a lifetime parameter to `MakeWriter` (tokio-rs#781), I accidentally clobbered the `make_writer_for` method on the inner `Boxed` type, so that it only has `make_writer`: tokio-rs@6cc6c47#diff-c5dc275b15a60c1a2d4694da3797f4247c4f2e1e0978fd210dd14452d6746283L737-L739 This meant that any filtering performed by the `MakeWriter` inside the box is now ignored. My bad! ## Solution This commit puts back the missing `make_writer_for` method. Whoops! Fixes tokio-rs#1694
# 0.3.2 (Nov 19, 2021) ### Fixed - **fmt**: Fixed `MakeWriter` filtering not working with `BoxMakeWriter` ([tokio-rs#1694]) ### Added - **fmt**: `Writer::has_ansi_escapes` method to check if an output supports ANSI terminal formatting escape codes ([tokio-rs#1696]) - **fmt**: Added additional ANSI terminal formatting to field formatters when supported ([tokio-rs#1702]) - **fmt**: Added `FmtContext::span_scope`, `FmtContext::event_scope`, and `FmtContext::parent_span` methods for accessing the current span and its scope when formatting an event ([tokio-rs#1728]) - **fmt**: Improved documentation on implementing event formatters ([tokio-rs#1727]) [tokio-rs#1694]: tokio-rs#1694 [tokio-rs#1696]: tokio-rs#1696 [tokio-rs#1702]: tokio-rs#1702 [tokio-rs#1728]: tokio-rs#1728 [tokio-rs#1727]: tokio-rs#1727
Bug Report
I found that events are no longer sorted when contained in the fmt::writer::Boxed, here's the diff
Version
change from 0.2.25 to 0.3.1
Platform
x86_64-apple-darwin
rustc 1.57.0-nightly (9dbb26efe 2021-10-03)
Description
I have tests which verify the content of tracing output to either contain or not contain events based on the level. As of 0.3.1 events are completely unfiltered.
The text was updated successfully, but these errors were encountered: