mirror of
https://github.com/crunchy-labs/crunchy-cli.git
synced 2026-01-21 20:22:01 -06:00
Rewrite it in Rust
This commit is contained in:
parent
d4bef511cb
commit
039d7cfb81
51 changed files with 4018 additions and 3208 deletions
19
crunchy-cli-core/src/utils/log.rs
Normal file
19
crunchy-cli-core/src/utils/log.rs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
use log::info;
|
||||
|
||||
pub struct ProgressHandler;
|
||||
|
||||
impl Drop for ProgressHandler {
|
||||
fn drop(&mut self) {
|
||||
info!(target: "progress_end", "")
|
||||
}
|
||||
}
|
||||
|
||||
macro_rules! progress {
|
||||
($($arg:tt)+) => {
|
||||
{
|
||||
log::info!(target: "progress", $($arg)+);
|
||||
$crate::utils::log::ProgressHandler{}
|
||||
}
|
||||
}
|
||||
}
|
||||
pub(crate) use progress;
|
||||
Loading…
Add table
Add a link
Reference in a new issue