From bf301794f6b7bb84dea8efab40ccc5a53371bace Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Hru=C5=A1ka?= Date: Sat, 21 Aug 2021 00:33:06 +0200 Subject: [PATCH] improve logging --- src/main.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index f85f03e..a7c670c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -30,10 +30,11 @@ fn main() -> anyhow::Result<()> { for event in client.streaming_user()? { match event { Event::Update(status) => { - debug!("Status: {:#?}", status); + info!("Status: {:?}", status); }, Event::Notification(notification) => { - debug!("Notification: {:#?}", notification); + info!("Notification: {:?}", notification.notification_type); + debug!("{:?}", notification); match notification.notification_type { NotificationType::Mention => { @@ -77,15 +78,17 @@ fn main() -> anyhow::Result<()> { } }, Event::Delete(id) => { - debug!("Delete: {}", id); + info!("Delete: {}", id); }, Event::FiltersChanged => { - debug!("FiltersChanged"); + info!("FiltersChanged"); // ??? }, } } + println!("Main loop ended!"); + Ok(()) }