Skip to content

Commit

Permalink
fix(cli): print Android logs for all tags
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog committed Jan 17, 2023
1 parent 630a7f4 commit 8cc1114
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
6 changes: 6 additions & 0 deletions .changes/logcat-all-tags.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"cli.rs": patch
"cli.js": patch
---

Print log output for all tags on Android development.
4 changes: 2 additions & 2 deletions tooling/cli/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 13 additions & 2 deletions tooling/cli/src/mobile/android.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use tauri_mobile::{
target::Target,
},
config::app::App,
opts::NoiseLevel,
opts::{FilterLevel, NoiseLevel},
os,
util::prompt,
};
Expand Down Expand Up @@ -95,7 +95,18 @@ pub fn get_config(

let raw = RawAndroidConfig {
features: android_options.features.clone(),
logcat_filter_specs: vec!["RustStdoutStderr".into(), "*:E".into()],
logcat_filter_specs: vec![
"RustStdoutStderr".into(),
format!(
"*:{}",
match cli_options.noise_level {
NoiseLevel::Polite => FilterLevel::Info,
NoiseLevel::LoudAndProud => FilterLevel::Debug,
NoiseLevel::FranklyQuitePedantic => FilterLevel::Verbose,
}
.logcat()
),
],
..Default::default()
};
let config = AndroidConfig::from_raw(app.clone(), Some(raw)).unwrap();
Expand Down

0 comments on commit 8cc1114

Please sign in to comment.