@tauri-apps/plugin-log
Type Aliases
LogOptions
LogOptions: object;Type declaration
| Member | Type |
|---|---|
file? | string |
keyValues? | Record< string, string | undefined > |
line? | number |
Source: index.ts:9
Functions
attachConsole()
attachConsole(): Promise< UnlistenFn >Returns
Promise< UnlistenFn >
Source: index.ts:192
debug()
debug(message, options?): Promise< void >Logs a message at the debug level.
Parameters
| Parameter | Type | Description |
|---|---|---|
message | string | # Examplesjs 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 | - |
Returns
Promise< void >
Source: index.ts:158
error()
error(message, options?): Promise< void >Logs a message at the error level.
Parameters
| Parameter | Type | Description |
|---|---|---|
message | string | # Examplesjs import { error } from '@tauri-apps/plugin-log'; const err_info = "No connection"; const port = 22; error(Error: ${err_info} on port ${port}); |
options? | LogOptions | - |
Returns
Promise< void >
Source: index.ts:92
info()
info(message, options?): Promise< void >Logs a message at the info level.
Parameters
| Parameter | Type | Description |
|---|---|---|
message | string | # Examplesjs 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 | - |
Returns
Promise< void >
Source: index.ts:136
trace()
trace(message, options?): Promise< void >Logs a message at the trace level.
Parameters
| Parameter | Type | Description |
|---|---|---|
message | string | # Examplesjs 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 | - |
Returns
Promise< void >
Source: index.ts:180
warn()
warn(message, options?): Promise< void >Logs a message at the warn level.
Parameters
| Parameter | Type | Description |
|---|---|---|
message | string | # Examplesjs import { warn } from '@tauri-apps/plugin-log'; const warn_description = "Invalid Input"; warn(Warning! {warn_description}!); |
options? | LogOptions | - |
Returns
Promise< void >
Source: index.ts:114
© 2024 Tauri Contributors. CC-BY / MIT