Skip to content

fix: use indicatif-log-bridge to avoid breaking progress bar on log - #1747

Merged
aawsome merged 4 commits into
rustic-rs:mainfrom
LucaCiucci:main
May 2, 2026
Merged

aawsome merged 4 commits into
rustic-rs:mainfrom
LucaCiucci:main

Conversation

@LucaCiucci

@LucaCiucci LucaCiucci commented Apr 29, 2026 •

Copy link
Copy Markdown
Contributor

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.

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.
@LucaCiucci

Copy link
Copy Markdown
Contributor Author

d97f4f2 fixes the flickering issue.
Marking as "Ready for review".

@LucaCiucci
LucaCiucci marked this pull request as ready for review April 30, 2026 19:25
@LucaCiucci

Copy link
Copy Markdown
Contributor Author

Checks should be fixed now.

@aawsome aawsome left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@aawsome
aawsome added this pull request to the merge queue May 2, 2026
@aawsome

aawsome commented May 2, 2026

Copy link
Copy Markdown
Member

Thanks @LucaCiucci for this PR!
I actually reviewed an old version yesterday and was trying to understand why wrapping the TextAppender would work for this ;-) - then I saw the new commit :-)

Merged via the queue into rustic-rs:main with commit bf3c820 May 2, 2026
30 checks passed
@LucaCiucci

Copy link
Copy Markdown
Contributor Author

Sorry for the confusion @aawsome , I initially wrapped the wrong appender.
Thanks for merging!

pull Bot pushed a commit to Mu-L/rustic that referenced this pull request Jun 3, 2026
## 🤖 New release

* `rustic-rs`: 0.11.2 -> 0.11.3 (✓ API compatible changes)

<details><summary><i><b>Changelog</b></i></summary><p>

<blockquote>

##
[0.11.3](rustic-rs/rustic@v0.11.2...v0.11.3)
- 2026-06-03

### Added

- Add ls option to backup command
([rustic-rs#1771](rustic-rs#1771))
- add JSON progress output option
([rustic-rs#1751](rustic-rs#1751))
- Add warning about profile-substitute without profiles
([rustic-rs#1743](rustic-rs#1743))
- *(commands)* Add version command
([rustic-rs#1738](rustic-rs#1738))

### Fixed

- Throttle configuration example
([rustic-rs#1766](rustic-rs#1766))
- add required scheme to sftp endpoint
([rustic-rs#1758](rustic-rs#1758))
- use indicatif-log-bridge to avoid breaking progress bar on log
([rustic-rs#1747](rustic-rs#1747))
- respect config-supplied backup(.snapshot).init
([rustic-rs#1742](rustic-rs#1742))

### Other

- dependency updates
([rustic-rs#1772](rustic-rs#1772))
- Add opendal as backup source
([rustic-rs#1769](rustic-rs#1769))
- config/README.md: mention string requirement for [repository.options]
([rustic-rs#1750](rustic-rs#1750))
- Add link/note to opendal's backend documentation
([rustic-rs#1749](rustic-rs#1749))
- add gdrive service example
([rustic-rs#1760](rustic-rs#1760))
- update rustic_core
([rustic-rs#1767](rustic-rs#1767))
- *(deps)* bump thin-vec from 0.2.14 to 0.2.16
([rustic-rs#1732](rustic-rs#1732))
- *(deps)* bump rustls-webpki from 0.103.10 to 0.103.13
([rustic-rs#1745](rustic-rs#1745))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).

Co-authored-by: rustic-release-plz[bot] <182542030+rustic-release-plz[bot]@users.noreply.github.com>
social4hyq pushed a commit to social4hyq/homebrew-core that referenced this pull request Sep 20, 2026
rustic 0.11.3

Created-by: HarmonybrewBot
Commit-by: HarmonybrewBot
Merged-by: HarmonybrewBot
Description: Created by `brew bump`

---

Created with `brew bump-formula-pr`.<details>
  <summary>release notes</summary>
  <pre>Hello rusticeans,

we are happy to release rustic 0.11.3! This release adds the possibility to use remote storages supported by openDAL as backup source. Note this is an early implementation and may miss features - feedback is warmly welcome!
Besides this, we have many other improvements and minor bug fixes - many of them come from community contributions - thanks a lot to everybody who contributed!

# Changelog

### Added

- Add opendal as backup source ([#1769](rustic-rs/rustic#1769), [#518](rustic-rs/rustic_core#518))
- Add ls option to backup command ([#1771](rustic-rs/rustic#1771))
- add JSON progress output option ([#1751](rustic-rs/rustic#1751))
- enable pcloud backend feature ([#515](rustic-rs/rustic_core#515))
- Add warning about profile-substitute without profiles ([#1743](rustic-rs/rustic#1743))
- Add version command ([#1738](rustic-rs/rustic#1738))
- scope destination scan to snapshot-relevant paths for restore ([#493](rustic-rs/rustic_core#493))

### Fixed

- Throttle configuration example ([#1766](rustic-rs/rustic#1766))
- add required scheme to sftp endpoint ([#1758](rustic-rs/rustic#1758))
- use indicatif-log-bridge to avoid breaking progress bar on log ([#1747](rustic-rs/rustic#1747))
- respect config-supplied backup(.snapshot).init ([#1742](rustic-rs/rustic#1742))
- local BE - don't leave broken files when writing fails ([#499](rustic-rs/rustic_core#499))
- include repo root in warmup paths ([#509](rustic-rs/rustic_core#509)) ([#510](rustic-rs/rustic_core#510))

### Other

- dependency updates ([#1772](rustic-rs/rustic#1772), [#1767](rustic-rs/rustic#1767), [#507](rustic-rs/rustic_core#507))
- config/README.md: mention string requirement for [repository.options] ([#1750](rustic-rs/rustic#1750))
- Add link/note to opendal's backend documentation ([#1749](rustic-rs/rustic#1749))
- add gdrive service example ([#1760](rustic-rs/rustic#1760))
- Use Smallvec ([#514](rustic-rs/rustic_core#514))
- parallelize blob fetch in dump command ([#501](https://github.com/rustic-rs/rustic_core/pull/501))</pre>
  <p>View the full release notes at <a href="https://github.com/rustic-rs/rustic/releases/tag/v0.11.3">https://github.com/rustic-rs/rustic/releases/tag/v0.11.3</a>.</p>
</details>
<hr>

See merge request: Harmonybrew/homebrew-core!10395
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.

Log output breaks progress bar

2 participants