fix: use indicatif-log-bridge to avoid breaking progress bar on log#1747
Open
LucaCiucci wants to merge 4 commits intorustic-rs:mainfrom
Open
fix: use indicatif-log-bridge to avoid breaking progress bar on log#1747LucaCiucci wants to merge 4 commits intorustic-rs:mainfrom
LucaCiucci wants to merge 4 commits intorustic-rs:mainfrom
Conversation
When showing a progress bar, a log message previously caused the bar to be printed again without clearing. `indicatif-log-bridge` solves that by just pausing the progress bar before printing. Unfortunately this intriduces some flickering to the progress bar for unknown reasons.
`indicatif-log-bridge` combined with log4rs appenders cause some flickering of the progress bars. The reason is that `<log4r::Logger as log::Log>::enabled` does a coarse filtering and single appenders may decide not to print any message. This is the case with our `FileAppender`, which forces many trace and debug messages to be hidden but still flagged as enabled. This causes many unnecessary pauses inside `indicatif-log-bridge`, which uses `log::Log::enabled` as a discriminant. This new approach avoids the issue by wrapping the specific `FileLogger` appender, so that we suspend the progress bar only when the real print happens.
Author
|
d97f4f2 fixes the flickering issue. |
Author
|
Checks should be fixed now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tentative fix for #1746 using
indicatif-log-bridge.Marking as "draft" PR since it adds some flickering to the progress bar. I have to investigate this.
Fixes #1746.