Updated logging

This commit is contained in:
quexeky
2024-10-15 11:04:50 +11:00
parent 8a2d23df26
commit b3963b60b5
5 changed files with 107 additions and 4 deletions

View File

@ -8,7 +8,8 @@ use std::{
sync::{LazyLock, Mutex},
task, thread,
};
use env_logger;
use env_logger::Env;
use auth::{auth_initiate, recieve_handshake};
use db::{DatabaseInterface, DATA_ROOT_DIR};
use log::info;
@ -48,9 +49,7 @@ fn fetch_state<'a>(state: tauri::State<'_, Mutex<AppState>>) -> Result<AppState,
}
fn setup<'a>() -> AppState {
Builder::with_level("info")
.with_target_writer("*", new_writer(io::stdout()))
.init();
env_logger::Builder::from_env(Env::default().default_filter_or("info")).init();
let is_set_up = db::is_set_up();
if !is_set_up {