Skip to content

Commit

Permalink
fix: clean up debug log output
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Nov 5, 2024
1 parent 0329868 commit 86b3961
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/logger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,8 @@ impl Logger {
)
}
LevelFilter::Debug => format!(
"{level} {module_path} {args}",
"{level} {args}",
level = self.styled_level(record.level()),
module_path = record.module_path().unwrap_or_default(),
args = record.args()
),
_ => {
Expand Down
7 changes: 3 additions & 4 deletions src/ui/progress_report.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,17 +144,16 @@ impl SingleReport for VerboseReport {
eprintln!("{message}");
}
fn set_message(&self, message: String) {
// let prefix = normal_prefix(self.pad, &self.prefix);
// eprintln!("{prefix} {message}");
eprintln!("{message}");
let prefix = normal_prefix(self.pad, &self.prefix);
info!("{prefix} {message}");
}
fn finish(&self) {
self.finish_with_message(style::egreen("done").to_string());
}
fn finish_with_message(&self, message: String) {
let prefix = success_prefix(self.pad - 2, &self.prefix);
let ico = style::egreen("✓").bright();
eprintln!("{prefix} {ico} {message}");
info!("{prefix} {ico} {message}");
}
}

Expand Down

0 comments on commit 86b3961

Please sign in to comment.