Skip to main content

Crate tauri_plugin_log

Crate tauri_plugin_log 

Source
Expand description

Logging for Tauri applications.

§Cargo features

  • colored: Enables Builder::with_colors, which uses fern’s colored feature for ANSI-colored outputs.
  • tracing: Emit both log and tracing for the JavaScript log commands.

Re-exports§

pub use fern;
pub use log;

Structs§

Builder
Builds the log plugin, configuring targets, rotation, formatting and level filters before attaching the resulting logger as the global logger for the log crate.
Target
A log target.

Enums§

Error
The error type returned by this plugin’s fallible operations.
FileOpenStrategy
The strategy used to open a log file when a TargetKind::Folder or TargetKind::LogDir target is set up.
LogLevel
An enum representing the available verbosity levels of the logger.
RotationStrategy
The strategy applied to a log file when it exceeds Builder::max_file_size.
TargetKind
An enum representing the available targets of the logger.
TimezoneStrategy
The timezone used to compute the current time for log message timestamps and rotated log file names.

Constants§

WEBVIEW_TARGET
The log target prefix used for log records emitted through the JavaScript trace/debug/info/warn/error bindings, optionally followed by ::{location} when the caller’s source location could be determined.

Functions§

attach_logger
Attaches the given logger