Skip to content
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

Fix Rust 3rdparty logs showing up with --dynamic-ui #10640

Merged
merged 1 commit into from
Aug 18, 2020

Conversation

Eric-Arellano
Copy link
Contributor

Before, if --dynamic-ui was set and -ldebug, we would get messages like:

18:51:12.29 [DEBUG] glob converted to regex: Glob { glob: "**/.*", re: "(?-u)^(?:/?|.*/)\\.[^/]*$", opts: GlobOptions { case_insensitive: false, literal_separator: true, backslash_escape: true }, tokens: Tokens([RecursivePrefix, Literal('.'), ZeroOrMore]) }
18:51:12.29 [DEBUG] built glob set; 0 literals, 2 basenames, 1 extensions, 0 prefixes, 0 suffixes, 0 required extensions, 1 regexes

This was because filtering of 3rd party modules happening in MaybeWriteLogger, which isn't used by the dynamic UI.

This also renames the logger variables to be less generic so that we can more clearly distinguish between our own abstractions vs. upstream crates.

[ci skip-build-wheels]

# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
use_color: AtomicBool::new(true),
use_color: AtomicBool::new(false),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I figure it's safer to default to not using color until we know for certain that it's safe to enable.

Comment on lines -193 to +204
if callback(&log_string).is_err() {
let handler_res = callback(&log_string);
if handler_res.is_err() {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made this change to try to make more obvious that callback() has a side effect.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 0.0% when pulling 0be913f on Eric-Arellano:logs-3rdparty into f808253 on pantsbuild:master.

@Eric-Arellano Eric-Arellano merged commit 5d7600d into pantsbuild:master Aug 18, 2020
@Eric-Arellano Eric-Arellano deleted the logs-3rdparty branch August 18, 2020 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants