console-rs / indicatif

A command line progress reporting library for Rust
MIT License
4.47k stars 244 forks source link

added LogWrapper to bridge indicatif and the log crate #569

Closed djugei closed 1 year ago

djugei commented 1 year 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 1 year 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 1 year ago

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

djugei commented 1 year ago

yeah i agree, did it here:

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

chris-laplante commented 1 year 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 1 year ago

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