Skip to content

Migrate from tauri-plugin-log

Use this guide when an existing Tauri app already uses tauri-plugin-log, frontend console capture, JSONL traces, or manually collected logs.

Auditaur is not just a log sink. It stores local SQLite telemetry that can be queried by the CLI and MCP server: logs, frontend exceptions, failed IPC calls, traces, events, window state, session churn, and issue-ready exception reports.

Existing patternAuditaur replacement
tauri-plugin-log backend log filesRust tracing records stored in the Auditaur session database
Manual frontend console/error capture@auditaur/api console and error instrumentation
Ad hoc JSONL trace filesOpenTelemetry-shaped spans, IPC rows, events, and timeline views
Pasted logs in bug reportsauditaur bundle --redacted and auditaur exceptions --markdown
Guessing why dev sessions restartedauditaur apps --json churn hints and auditaur health --json

Keep app-specific diagnostics that Auditaur cannot infer, such as visual inspection commands, domain-specific health checks, or custom reproduction state. Those can coexist with Auditaur and be referenced from issue reports.

Typical logging-only setup:

tauri::Builder::default()
.plugin(tauri_plugin_log::Builder::new().build())
.run(tauri::generate_context!())
.expect("failed to run app");

Frontend code often imports Tauri directly:

import { invoke } from '@tauri-apps/api/core';
await invoke('render_video', { id });

Add Auditaur in src-tauri\Cargo.toml:

[dependencies]
tauri-plugin-auditaur = "0.1.3"
tracing = "0.1"
tracing-subscriber = "0.3"

Register the tracing layer and plugin:

use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt};
fn main() {
tracing_subscriber::registry()
.with(tauri_plugin_auditaur::tracing_layer())
.init();
tauri::Builder::default()
.plugin(
tauri_plugin_auditaur::Builder::new()
.service_name("my-tauri-app")
.session_name("dev")
.build(),
)
.run(tauri::generate_context!())
.expect("failed to run app");
}

Add auditaur:default to src-tauri\capabilities\default.json:

{
"permissions": ["core:default", "auditaur:default"]
}

Install the frontend package:

Terminal window
npm install @auditaur/api@0.2.1

Create a local wrapper such as src\services\tauri.ts:

import { initAuditaur } from '@auditaur/api';
const auditaur = await initAuditaur({
serviceName: 'my-tauri-app',
instrumentConsole: true,
instrumentErrors: true,
instrumentTauriInvoke: true,
instrumentTauriEvents: true,
});
export const invoke = auditaur.invoke;
export const emit = auditaur.emit;
export const emitTo = auditaur.emitTo;
export const listen = auditaur.listen;

Then migrate app code gradually:

import { invoke } from '@tauri-apps/api/core';
import { invoke } from './services/tauri';
await invoke('render_video', { id });

Add backend trace continuation where it matters

Section titled “Add backend trace continuation where it matters”

Commands continue to work without changes. For high-value commands, add instrument_ipc so frontend invoke spans connect to backend command spans:

use tauri_plugin_auditaur::IpcTraceContext;
#[tauri::command]
#[tauri_plugin_auditaur::instrument_ipc(err)]
fn render_video(
id: String,
auditaur_trace_context: Option<IpcTraceContext>,
) -> Result<(), String> {
tracing::info!(video.id = %id, "rendering video");
Ok(())
}

Run the app in development mode, exercise a few commands, then run:

Terminal window
auditaur doctor tauri --path src-tauri --json
auditaur apps --json
auditaur health --json
auditaur logs --json
auditaur ipc --failed --json
auditaur traces --failed --json
auditaur exceptions --json

For an issue-ready exception draft:

Terminal window
auditaur exceptions --fingerprint <id> --markdown --output issue.md

Review and redact any report before posting it outside the machine.

Auditaur is local-first and development/debug oriented by default. Release builds are blocked unless the Rust plugin is configured with allow_release_builds(true).

Only enable release-build collection after you have reviewed:

  1. What your app emits in logs, spans, IPC args, events, and exceptions.
  2. Whether full payload capture is disabled or safely redacted.
  3. Whether users explicitly consent to diagnostic collection/export.
  4. Where exported bundles or issue drafts will be stored.