Skip to content

@tauri-apps/plugin-log

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/log/guest-js/index.ts#L14

Debug: 2;

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/log/guest-js/index.ts#L26

The “debug” level.

Designates lower priority information.

Error: 5;

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/log/guest-js/index.ts#L44

The “error” level.

Designates very serious errors.

Info: 3;

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/log/guest-js/index.ts#L32

The “info” level.

Designates useful information.

Trace: 1;

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/log/guest-js/index.ts#L20

The “trace” level.

Designates very low priority, often extremely verbose, information.

Warn: 4;

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/log/guest-js/index.ts#L38

The “warn” level.

Designates hazardous situations.

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/log/guest-js/index.ts#L8

Property Type Defined in
file? string Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/log/guest-js/index.ts#L9
keyValues? Record<string, string | undefined> Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/log/guest-js/index.ts#L11
line? number Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/log/guest-js/index.ts#L10

function attachConsole(): Promise<UnlistenFn>;

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/log/guest-js/index.ts#L277

Attaches a listener that writes log entries to the console as they come in.

Promise<UnlistenFn>

a function to cancel the listener.


function attachLogger(fn): Promise<UnlistenFn>;

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/log/guest-js/index.ts#L256

Attaches a listener for the log, and calls the passed function for each log entry.

Parameter Type Description
fn LoggerFn -

Promise<UnlistenFn>

a function to cancel the listener.


function debug(message, options?): Promise<void>;

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/log/guest-js/index.ts#L214

Logs a message at the debug level.

Parameter Type Description
message string # Examples import { debug } from '@tauri-apps/plugin-log'; const pos = { x: 3.234, y: -1.223 }; debug(New position: x: {pos.x}, y: {pos.y});
options? LogOptions -

Promise<void>


function error(message, options?): Promise<void>;

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/log/guest-js/index.ts#L148

Logs a message at the error level.

Parameter Type Description
message string # Examples import { error } from '@tauri-apps/plugin-log'; const err_info = "No connection"; const port = 22; error(Error: ${err_info} on port ${port});
options? LogOptions -

Promise<void>


function info(message, options?): Promise<void>;

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/log/guest-js/index.ts#L192

Logs a message at the info level.

Parameter Type Description
message string # Examples import { info } from '@tauri-apps/plugin-log'; const conn_info = { port: 40, speed: 3.20 }; info(Connected to port {conn_info.port} at {conn_info.speed} Mb/s);
options? LogOptions -

Promise<void>


function trace(message, options?): Promise<void>;

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/log/guest-js/index.ts#L236

Logs a message at the trace level.

Parameter Type Description
message string # Examples import { trace } from '@tauri-apps/plugin-log'; let pos = { x: 3.234, y: -1.223 }; trace(Position is: x: {pos.x}, y: {pos.y});
options? LogOptions -

Promise<void>


function warn(message, options?): Promise<void>;

Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/log/guest-js/index.ts#L170

Logs a message at the warn level.

Parameter Type Description
message string # Examples import { warn } from '@tauri-apps/plugin-log'; const warn_description = "Invalid Input"; warn(Warning! {warn_description}!);
options? LogOptions -

Promise<void>


© 2026 Tauri Contributors. CC-BY / MIT