feat: log warning when generating report
This commit is contained in:
parent
162959ca45
commit
258f18a99d
1 changed files with 5 additions and 1 deletions
|
|
@ -137,8 +137,12 @@ impl FileReporter {
|
|||
|
||||
fn _report(&self, report: &Report) -> Result<(), String> {
|
||||
let report_path = get_report_path(&self.path, report, "json").map_err(|e| e.to_string())?;
|
||||
let file = File::create(report_path).map_err(|e| e.to_string())?;
|
||||
let file = File::create(&report_path).map_err(|e| e.to_string())?;
|
||||
serde_json::to_writer_pretty(&file, &report).map_err(|e| e.to_string())?;
|
||||
tracing::warn!(
|
||||
"created report: {}",
|
||||
report_path.to_str().unwrap_or_default()
|
||||
);
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue