From d31f291e269d8ca503d329c314bb10f23441bc42 Mon Sep 17 00:00:00 2001 From: Neshura Date: Mon, 31 Jul 2023 19:22:28 +0200 Subject: [PATCH] Debug Logging --- src/main.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main.rs b/src/main.rs index f3849f8..b2e106f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -99,20 +99,25 @@ impl Bot { #[warn(unused_results)] pub(crate) fn run_once(&mut self, mut prev_time: NaiveTime) -> bool { + println!("{:#<1$}", "", 30); self.start_time = Utc::now(); if self.start_time.time() - prev_time > chrono::Duration::seconds(6) { // Prod should use hours, add command line switch later and read duration from config + println!("Reloading Config"); prev_time = self.start_time.time(); self.config.load(); if !self.community_ids.load(&self.auth, &self.config.instance) {return false}; // Return early if community id's cannot be loaded + println!("Done!"); } // Start the polling process // Get all feed URLs (use cache) + println!("Checking Feeds"); let post_queue: Vec = match self.config.check_feeds(&mut self.post_history, &self.community_ids, &self.auth) { Ok(data) => data, Err(_) => return false }; + println!("Done!"); post_queue.iter().for_each(|post| { println!("Posting: {}", post.name);