-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cli): add log plugin to the app template (#11004)
* feat(cli): add log plugin to the app template The log plugin is really important for mobile development - without it you don't have a clue about logs and stdout for iOS apps * patch tauri dep for local testing * clippy
- Loading branch information
1 parent
35bd9dd
commit 6c5340f
Showing
5 changed files
with
29 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@tauri-apps/cli": patch:enhance | ||
"tauri-cli": patch:enhance | ||
--- | ||
|
||
Added the `log` plugin to the app template, which is required to visualize logs on Android and iOS. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,16 @@ | ||
#[cfg_attr(mobile, tauri::mobile_entry_point)] | ||
pub fn run() { | ||
tauri::Builder::default() | ||
.setup(|app| { | ||
if cfg!(debug_assertions) { | ||
app.handle().plugin( | ||
tauri_plugin_log::Builder::default() | ||
.level(log::LevelFilter::Info) | ||
.build(), | ||
)?; | ||
} | ||
Ok(()) | ||
}) | ||
.run(tauri::generate_context!()) | ||
.expect("error while running tauri application"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters