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
unsafe {
i18n::LANG = config::get().unwrap().launcher.language.parse().unwrap();
tracing::info!("Set UI language to {}", i18n::LANG);
}
// Run the app

View file

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

View file

@ -125,6 +125,8 @@ impl SimpleComponent for App {
root: &Self::Root,
_sender: ComponentSender<Self>,
) -> ComponentParts<Self> {
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<Self>) {
tracing::debug!("Called main window event: {:?}", msg);
match msg {
AppMsg::OpenPreferences => {
self.preferences_window.widgets().preferences_window.show();