mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-11-23 11:10:22 +00:00
Added debug logging
This commit is contained in:
parent
a6a52989b8
commit
ce302e7b98
@ -1,6 +1,6 @@
|
||||
use std::sync::Mutex;
|
||||
use std::time::Duration;
|
||||
use log::{error, info, trace, warn};
|
||||
use log::{debug, error, info, trace, warn};
|
||||
use once_cell::sync::Lazy;
|
||||
use rocket::{get, post};
|
||||
use rocket::serde::json::Json;
|
||||
@ -46,8 +46,12 @@ pub fn start_tauri() {
|
||||
.build(tauri::generate_context!())
|
||||
.expect("Error while running Tauri application");
|
||||
|
||||
app.run(|app_handle, event| match event {
|
||||
app.run(|app_handle, event| {
|
||||
if !matches!(event, tauri::RunEvent::MainEventsCleared) {
|
||||
debug!(Source = "Tauri"; "Event received: {event:?}");
|
||||
}
|
||||
|
||||
match event {
|
||||
tauri::RunEvent::WindowEvent { event, label, .. } => {
|
||||
match event {
|
||||
tauri::WindowEvent::CloseRequested { .. } => {
|
||||
@ -68,7 +72,6 @@ pub fn start_tauri() {
|
||||
|
||||
tauri::RunEvent::Updater(updater_event) => {
|
||||
match updater_event {
|
||||
|
||||
tauri::UpdaterEvent::UpdateAvailable { body, date, version } => {
|
||||
let body_len = body.len();
|
||||
info!(Source = "Tauri"; "Updater: update available: body size={body_len} time={date:?} version={version}");
|
||||
@ -102,7 +105,6 @@ pub fn start_tauri() {
|
||||
} else {
|
||||
warn!(Source = "Tauri"; "Development environment detected; do not restart the app.");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
tauri::UpdaterEvent::AlreadyUpToDate => {
|
||||
@ -124,6 +126,7 @@ pub fn start_tauri() {
|
||||
}
|
||||
|
||||
_ => {}
|
||||
}
|
||||
});
|
||||
|
||||
warn!(Source = "Tauri"; "Tauri app was stopped.");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user