console-rs / indicatif

A command line progress reporting library for Rust
MIT License
4.22k stars 238 forks source link

added LogWrapper to bridge indicatif and the log crate #569

Closed djugei closed 11 months ago

djugei commented 11 months ago

this is a much nicer solution than https://github.com/console-rs/indicatif/issues/566 and https://github.com/console-rs/indicatif/pull/567 in my opinion.

this is behind the "log" feature for now. we could consider making this a default feature, it barely adds any code, does add the log crate as dependency though.

chris-laplante commented 11 months ago

To be honest, I'm not sure this belongs in indicatif. I think I'd rather see it as a separate crate, e.g. like the other loggers: https://docs.rs/log/latest/log/#available-logging-implementations. I don't have strong feelings though, so I could be convinced otherwise.

djc commented 11 months ago

I agree. Would be happy to link to it from the README/documentation, though.

djugei commented 11 months ago

yeah i agree, did it here:

https://crates.io/crates/indicatif-log-bridge https://github.com/djugei/indicatif-log-bridge

chris-laplante commented 11 months ago

yeah i agree, did it here:

https://crates.io/crates/indicatif-log-bridge https://github.com/djugei/indicatif-log-bridge

Awesome, thanks! Feel free to submit a PR that edits the README to mention the crate.

djugei commented 11 months ago

allright i will, but first i gotta polish/add a bit of documentation to it