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
subscriber: if error occurs when formatting event, write error to Writer #2102
subscriber: if error occurs when formatting event, write error to Writer #2102
Commits on Apr 29, 2022
-
subscriber: if error occurs when formatting event, print to stderr
When `Format_event::format_event(...)` returns an error, we are currently silently dropping that Event. tokio-rs/valuable#88 explains one such case in which this was encountered (due to a bug in valuable-serde). We want to be made aware whenever an Event is dropped. This patch adds a single `eprintln` line to let the user know that we were unable to format a specific event. We are not emitting an actual tracing Event, to avoid the risk of a cycle (the new Event could trigger the same formatting error again). Resolves tokio-rs#1965.
Commits on Apr 30, 2022
-
subscriber: write format_event errors to Writer, update SubscriberBui…
…lder Update the error-handling logic when calling `format_event` to write the error message to the Writer. Only if that fails do we write to stderr. Define new method `SubscriberBuilder::with_silence_errors(bool)` so that a user may disable this behavior. Enabled by default. Add unit tests for both `silence_errors=true` and `false`.
Commits on May 11, 2022
Commits on May 18, 2022
-
-
Merge branch 'feat-1965-stderr-for-subscriber-fmt-errors' of github.c…
…om:bryangarza/tracing into feat-1965-stderr-for-subscriber-fmt-errors
Commits on May 25, 2022
Commits on Jul 8, 2022
-
Improve wording for
with_silence_errors
Co-authored-by: David Barsky <me@davidbarsky.com>
-
Update stderr messages to show origin is tracing_subscriber
Co-authored-by: Eliza Weisman <eliza@buoyant.io>
-
subscriber: update format_error_print_to_stderr unit test for OS-agno…
…stic assertions Co-authored-by: Eliza Weisman <eliza@buoyant.io>
-
-
subscriber: rename
with_silence_errors
to be more clearThis patch updates `with_silence_errors` to be named `with_silence_internal_errors`, and also updates the rustdocs so that it's more clear what its behavior is.
Commits on Jul 13, 2022
-
subscriber: rename with_silence_internal_errors flag
This patch renames the `with_silence_internal_errors` flag to simply `log_internal_errors`, and switches the default value to `true` since the flag now represents the opposite idea.