From 258f18a99d848ae7e6808beddad054037a3b3799 Mon Sep 17 00:00:00 2001 From: ThetaDev Date: Wed, 18 Dec 2024 19:33:43 +0100 Subject: [PATCH] feat: log warning when generating report --- src/report.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/report.rs b/src/report.rs index a0a793c..85477fa 100644 --- a/src/report.rs +++ b/src/report.rs @@ -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(()) } }