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.
What Auditaur can replace
Section titled “What Auditaur can replace”| Existing pattern | Auditaur replacement |
|---|---|
tauri-plugin-log backend log files | Rust tracing records stored in the Auditaur session database |
| Manual frontend console/error capture | @auditaur/api console and error instrumentation |
| Ad hoc JSONL trace files | OpenTelemetry-shaped spans, IPC rows, events, and timeline views |
| Pasted logs in bug reports | auditaur bundle --redacted and auditaur exceptions --markdown |
| Guessing why dev sessions restarted | auditaur 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.
Before
Section titled “Before”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:
npm install @auditaur/api@0.2.1Create 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(())}Verify the migration
Section titled “Verify the migration”Run the app in development mode, exercise a few commands, then run:
auditaur doctor tauri --path src-tauri --jsonauditaur apps --jsonauditaur health --jsonauditaur logs --jsonauditaur ipc --failed --jsonauditaur traces --failed --jsonauditaur exceptions --jsonFor an issue-ready exception draft:
auditaur exceptions --fingerprint <id> --markdown --output issue.mdReview and redact any report before posting it outside the machine.
Dev and release behavior
Section titled “Dev and release behavior”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:
- What your app emits in logs, spans, IPC args, events, and exceptions.
- Whether full payload capture is disabled or safely redacted.
- Whether users explicitly consent to diagnostic collection/export.
- Where exported bundles or issue drafts will be stored.