mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-04-23 11:36:13 +02:00
feat(log): enable TargetKind::LogDir on mobile (#2524)
* enable log dir on iOS/Android * Create change-pr-2524.md --------- Co-authored-by: Fabian-Lars <github@fabianlars.de>
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"log": patch
|
||||
"log-js": patch
|
||||
---
|
||||
|
||||
enable TargetKind::LogDir on mobile
|
||||
@@ -159,11 +159,12 @@ pub enum TargetKind {
|
||||
///
|
||||
/// ### Platform-specific
|
||||
///
|
||||
/// |Platform | Value | Example |
|
||||
/// | ------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------- |
|
||||
/// | Linux | `$XDG_DATA_HOME/{bundleIdentifier}/logs` or `$HOME/.local/share/{bundleIdentifier}/logs` | `/home/alice/.local/share/com.tauri.dev/logs` |
|
||||
/// | macOS | `{homeDir}/Library/Logs/{bundleIdentifier}` | `/Users/Alice/Library/Logs/com.tauri.dev` |
|
||||
/// | Windows | `{FOLDERID_LocalAppData}/{bundleIdentifier}/logs` | `C:\Users\Alice\AppData\Local\com.tauri.dev\logs` |
|
||||
/// |Platform | Value | Example |
|
||||
/// | --------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------- |
|
||||
/// | Linux | `$XDG_DATA_HOME/{bundleIdentifier}/logs` or `$HOME/.local/share/{bundleIdentifier}/logs` | `/home/alice/.local/share/com.tauri.dev/logs` |
|
||||
/// | macOS/iOS | `{homeDir}/Library/Logs/{bundleIdentifier}` | `/Users/Alice/Library/Logs/com.tauri.dev` |
|
||||
/// | Windows | `{FOLDERID_LocalAppData}/{bundleIdentifier}/logs` | `C:\Users\Alice\AppData\Local\com.tauri.dev\logs` |
|
||||
/// | Android | `{ConfigDir}/logs` | `/data/data/com.tauri.dev/files/logs` |
|
||||
LogDir { file_name: Option<String> },
|
||||
/// Forward logs to the webview (via the `log://log` event).
|
||||
///
|
||||
@@ -451,9 +452,6 @@ impl Builder {
|
||||
)?)?
|
||||
.into()
|
||||
}
|
||||
#[cfg(mobile)]
|
||||
TargetKind::LogDir { .. } => continue,
|
||||
#[cfg(desktop)]
|
||||
TargetKind::LogDir { file_name } => {
|
||||
let path = app_handle.path().app_log_dir()?;
|
||||
if !path.exists() {
|
||||
|
||||
Reference in New Issue
Block a user