LoggingPlugin

Function LoggingPlugin 

Source
pub fn LoggingPlugin<R: Runtime>(LogLevel: LevelFilter) -> TauriPlugin<R>
Expand description

Creates and configures the logging plugin with multi-target output and level filtering.

§Arguments

  • LogLevel - The desired log level (Trace, Debug, Info, Warn, Error)

§Returns

A configured tauri_plugin_log::TauriPlugin instance.

§Logging Strategy

  • Release default: Info (low noise) unless RUST_LOG overrides
  • Debug default: Debug (high fidelity) unless RUST_LOG overrides
  • Very noisy dependencies are capped using level_for(…) and filter(…)

§Targets

  • Stdout: Console output for development/terminal viewing
  • LogDir: Persistent log file (Mountain.log) in the app’s log directory
  • Webview: Logs sent to the webview console for frontend debugging

§Noise Filtering

The following noisy dependencies are capped at Info level regardless of RUST_LOG:

  • hyper: HTTP library verbose logs
  • mio: Async I/O polling logs
  • tao: Windowing system logs
  • tracing: Structured logging internal logs

Additionally, the following targets are filtered out entirely:

  • polling: File watcher events (very noisy)
  • tokio_reactor: Async reactor events
  • want: Connection readiness logs