From a3c760bbcebf7f54bad1eb27df11e8ee4b11bd9d Mon Sep 17 00:00:00 2001 From: Observer KRypt0n_ Date: Thu, 19 Jan 2023 13:50:54 +0200 Subject: [PATCH] Tracing: added some debug and info messages --- src/main.rs | 2 ++ src/ui/about.rs | 2 ++ src/ui/main.rs | 6 ++++++ 3 files changed, 10 insertions(+) diff --git a/src/main.rs b/src/main.rs index 85e517c..733e8ed 100644 --- a/src/main.rs +++ b/src/main.rs @@ -30,6 +30,8 @@ fn main() { // Set UI language unsafe { i18n::LANG = config::get().unwrap().launcher.language.parse().unwrap(); + + tracing::info!("Set UI language to {}", i18n::LANG); } // Run the app diff --git a/src/ui/about.rs b/src/ui/about.rs index e313f36..8ac6ee8 100644 --- a/src/ui/about.rs +++ b/src/ui/about.rs @@ -98,6 +98,8 @@ impl SimpleComponent for AboutDialog { } fn update(&mut self, msg: Self::Input, _sender: ComponentSender) { + tracing::debug!("Called about dialog event: {:?}", msg); + match msg { AppMsg::Show => { self.visible = true; diff --git a/src/ui/main.rs b/src/ui/main.rs index 2dbdac2..23eb6b6 100644 --- a/src/ui/main.rs +++ b/src/ui/main.rs @@ -125,6 +125,8 @@ impl SimpleComponent for App { root: &Self::Root, _sender: ComponentSender, ) -> ComponentParts { + tracing::info!("Initializing main window"); + let widgets = view_output!(); if crate::APP_DEBUG { @@ -168,10 +170,14 @@ impl SimpleComponent for App { READY = true; } + tracing::info!("Main window initialized. App is ready"); + ComponentParts { model, widgets } } fn update(&mut self, msg: Self::Input, _sender: ComponentSender) { + tracing::debug!("Called main window event: {:?}", msg); + match msg { AppMsg::OpenPreferences => { self.preferences_window.widgets().preferences_window.show();