mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2025-05-20 07:26:58 -04:00
refactor: Add logger
This commit is contained in:
@@ -15,15 +15,18 @@ rust-version = "1.59"
|
||||
tauri-build = { version = "1.2.1", features = [] }
|
||||
|
||||
[dependencies]
|
||||
tauri = { version = "1.2.4", features = ["http-all"] }
|
||||
tauri-plugin-log = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" }
|
||||
serde_json = "1.0"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
tauri = { version = "1.2.4", features = ["http-all"] }
|
||||
log = "0.4"
|
||||
env_logger = "0.10"
|
||||
common = { path = "../../common" }
|
||||
|
||||
[features]
|
||||
# by default Tauri runs in production mode
|
||||
# when `tauri dev` runs it is executed with `cargo run --no-default-features` if `devPath` is an URL
|
||||
default = [ "custom-protocol" ]
|
||||
default = ["custom-protocol"]
|
||||
# this feature is used for production builds where `devPath` points to the filesystem
|
||||
# DO NOT remove this
|
||||
custom-protocol = [ "tauri/custom-protocol" ]
|
||||
custom-protocol = ["tauri/custom-protocol"]
|
||||
|
@@ -4,6 +4,7 @@
|
||||
)]
|
||||
|
||||
use common::{Client, ServerApiError, VpnStatus};
|
||||
use env_logger::Env;
|
||||
use serde::Serialize;
|
||||
use std::sync::Arc;
|
||||
use tauri::{Manager, State};
|
||||
@@ -53,6 +54,8 @@ fn setup(app: &mut tauri::App) -> Result<(), Box<dyn std::error::Error>> {
|
||||
}
|
||||
|
||||
fn main() {
|
||||
env_logger::Builder::from_env(Env::default().default_filter_or("info")).init();
|
||||
|
||||
tauri::Builder::default()
|
||||
.setup(setup)
|
||||
.invoke_handler(tauri::generate_handler![
|
||||
|
Reference in New Issue
Block a user