mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-03 10:11:15 +02:00
fix(core): manage mobile logs, fix Android logcat filtering (#5659)
This commit is contained in:
committed by
GitHub
parent
f6f9192aa5
commit
6dcb7fbb81
@@ -1,23 +1,4 @@
|
||||
#[cfg(target_os = "android")]
|
||||
fn init_logging(app_name: &str) {
|
||||
android_logger::init_once(
|
||||
android_logger::Config::default()
|
||||
.with_min_level(log::Level::Trace)
|
||||
.with_tag(app_name),
|
||||
);
|
||||
}
|
||||
|
||||
#[cfg(not(target_os = "android"))]
|
||||
fn init_logging(_app_name: &str) {
|
||||
env_logger::init();
|
||||
}
|
||||
|
||||
#[tauri::mobile_entry_point]
|
||||
fn main() {
|
||||
super::AppBuilder::new()
|
||||
.setup(|app| {
|
||||
init_logging(&app.package_info().name);
|
||||
Ok(())
|
||||
})
|
||||
.run();
|
||||
super::AppBuilder::new().run();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user