Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ Just remember add each [ProgressBar](indicatif::ProgressBar) to the [MultiProgre

## Example
```rust
use env_logger;
use indicatif::{MultiProgress, ProgressBar};
use indicatif_log_bridge::LogWrapper;
use log::info;
use std::time::Duration;

fn main() {
let logger =
env_logger::Builder::from_env(env_logger::Env::default().default_filter_or("info"))
.build();
Expand All @@ -25,12 +32,13 @@ Just remember add each [ProgressBar](indicatif::ProgressBar) to the [MultiProgre

let pg = multi.add(ProgressBar::new(10));
for i in (0..10) {
std::thread::sleep(Duration::from_micros(100));
std::thread::sleep(Duration::from_secs(1));
info!("iteration {}", i);
pg.inc(1);
}
pg.finish();
multi.remove(&pg);
}
```
The code of this crate is pretty simple, so feel free to check it out.

Expand Down