Skip to content

Commit

Permalink
Add logging to clean
Browse files Browse the repository at this point in the history
  • Loading branch information
sax committed Dec 30, 2023
1 parent f068178 commit 4b77cca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bin/dev/start
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

set -e

cargo run -- diff $*
cargo run -- $*

5 changes: 4 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use dyd::manifest::Manifest;
use dyd::terminal::Tui;

use anyhow::Context;
use log;
use log4rs::append::rolling_file::policy::compound::roll::delete::DeleteRoller;
use log4rs::append::rolling_file::policy::compound::trigger::size::SizeTrigger;
use log4rs::append::rolling_file::policy::compound::CompoundPolicy;
Expand Down Expand Up @@ -42,10 +43,12 @@ fn clean(verbose: bool) -> AppResult<()> {
.expect("Expected .local/share/dyd to be a directory")
.flatten()
{
println!("Removing {:?}", repo.path());
println!("clean: {:?}", repo.path());
log::info!("clean: {:?}", repo.path());
std::fs::remove_dir_all(repo.path())?;
}
}
log::info!("clean: {:?}", path);
std::fs::remove_dir_all(path)?;
}
Ok(())
Expand Down

0 comments on commit 4b77cca

Please sign in to comment.