pub enum LogTarget {
Stdout,
Stderr,
Folder(PathBuf),
LogDir,
Webview,
}Expand description
An enum representing the available targets of the logger.
Variants§
Stdout
Print logs to stdout.
Stderr
Print logs to stderr.
Folder(PathBuf)
Write logs to the given directory.
The plugin will ensure the directory exists before writing logs.
LogDir
Write logs to the OS specific logs directory.
§Platform-specific
| Platform | Value | Example |
|---|---|---|
| Linux | {configDir}/{bundleIdentifier} | /home/alice/.config/com.tauri.dev |
| macOS | {homeDir}/Library/Logs/{bundleIdentifier} | /Users/Alice/Library/Logs/com.tauri.dev |
| Windows | {configDir}/{bundleIdentifier} | C:\Users\Alice\AppData\Roaming\com.tauri.dev |
Webview
Forward logs to the webview (via the log://log event).
This requires the webview to subscribe to log events, via this plugins attachConsole function.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LogTarget
impl RefUnwindSafe for LogTarget
impl Send for LogTarget
impl Sync for LogTarget
impl Unpin for LogTarget
impl UnwindSafe for LogTarget
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more