Tracing: added some debug and info messages

This commit is contained in:
Observer KRypt0n_ 2023-01-19 13:50:54 +02:00
parent a00df927f6
commit a3c760bbce
No known key found for this signature in database
GPG key ID: 844DA47BA25FE1E2
3 changed files with 10 additions and 0 deletions

View file

@ -30,6 +30,8 @@ fn main() {
// Set UI language // Set UI language
unsafe { unsafe {
i18n::LANG = config::get().unwrap().launcher.language.parse().unwrap(); i18n::LANG = config::get().unwrap().launcher.language.parse().unwrap();
tracing::info!("Set UI language to {}", i18n::LANG);
} }
// Run the app // Run the app

View file

@ -98,6 +98,8 @@ impl SimpleComponent for AboutDialog {
} }
fn update(&mut self, msg: Self::Input, _sender: ComponentSender<Self>) { fn update(&mut self, msg: Self::Input, _sender: ComponentSender<Self>) {
tracing::debug!("Called about dialog event: {:?}", msg);
match msg { match msg {
AppMsg::Show => { AppMsg::Show => {
self.visible = true; self.visible = true;

View file

@ -125,6 +125,8 @@ impl SimpleComponent for App {
root: &Self::Root, root: &Self::Root,
_sender: ComponentSender<Self>, _sender: ComponentSender<Self>,
) -> ComponentParts<Self> { ) -> ComponentParts<Self> {
tracing::info!("Initializing main window");
let widgets = view_output!(); let widgets = view_output!();
if crate::APP_DEBUG { if crate::APP_DEBUG {
@ -168,10 +170,14 @@ impl SimpleComponent for App {
READY = true; READY = true;
} }
tracing::info!("Main window initialized. App is ready");
ComponentParts { model, widgets } ComponentParts { model, widgets }
} }
fn update(&mut self, msg: Self::Input, _sender: ComponentSender<Self>) { fn update(&mut self, msg: Self::Input, _sender: ComponentSender<Self>) {
tracing::debug!("Called main window event: {:?}", msg);
match msg { match msg {
AppMsg::OpenPreferences => { AppMsg::OpenPreferences => {
self.preferences_window.widgets().preferences_window.show(); self.preferences_window.widgets().preferences_window.show();