From d50bf01db6be8aa4f8a9f76ca69dd563a35c3ff8 Mon Sep 17 00:00:00 2001 From: Neshura Date: Mon, 6 May 2024 20:55:30 +0200 Subject: [PATCH] Fix erroneous print statement to use logger --- src/fetchers/jnovel.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/fetchers/jnovel.rs b/src/fetchers/jnovel.rs index f24d018..83ac5ff 100644 --- a/src/fetchers/jnovel.rs +++ b/src/fetchers/jnovel.rs @@ -21,6 +21,15 @@ macro_rules! error { }; } +macro_rules! info { + ($msg:tt) => { + match connected_to_journal() { + true => log::info!("[INFO] {}", $msg), + false => println!("[INFO] {}", $msg), + } + }; +} + static PAST_DAYS_ELIGIBLE: u8 = 4; macro_rules! api_url { @@ -328,7 +337,7 @@ impl Fetcher for JFetcherOptions { match part_number { Some(number) => new_part_info = Part(number), None => { - println!("No Part found, assuming 1"); + info!("No Part found, assuming 1"); new_part_info = Part(1); } }