@tauri-apps/plugin-log
Interfaces
LogOptions
Properties
Property | Type |
---|---|
file? | string |
keyValues? | Record <string , undefined | string > |
line? | number |
Functions
attachConsole()
Attaches a listener that writes log entries to the console as they come in.
Returns
Promise
<UnlistenFn
>
a function to cancel the listener.
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/log/guest-js/index.ts#L220
attachLogger()
Attaches a listener for the log, and calls the passed function for each log entry.
Parameters
Parameter | Type | Description |
---|---|---|
fn | LoggerFn |
Returns
Promise
<UnlistenFn
>
a function to cancel the listener.
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/log/guest-js/index.ts#L199
debug()
Logs a message at the debug level.
Parameters
Parameter | Type | Description |
---|---|---|
message | string | Examplesimport { debug } from ‘@tauri-apps/plugin-log’; |
options ? | LogOptions | - |
Returns
Promise
<void
>
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/log/guest-js/index.ts#L157
error()
Logs a message at the error level.
Parameters
Parameter | Type | Description |
---|---|---|
message | string | Examplesimport { error } from ‘@tauri-apps/plugin-log’; |
options ? | LogOptions | - |
Returns
Promise
<void
>
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/log/guest-js/index.ts#L91
info()
Logs a message at the info level.
Parameters
Parameter | Type | Description |
---|---|---|
message | string | Examplesimport { info } from ‘@tauri-apps/plugin-log’; |
options ? | LogOptions | - |
Returns
Promise
<void
>
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/log/guest-js/index.ts#L135
trace()
Logs a message at the trace level.
Parameters
Parameter | Type | Description |
---|---|---|
message | string | Examplesimport { trace } from ‘@tauri-apps/plugin-log’; |
options ? | LogOptions | - |
Returns
Promise
<void
>
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/log/guest-js/index.ts#L179
warn()
Logs a message at the warn level.
Parameters
Parameter | Type | Description |
---|---|---|
message | string | Examplesimport { warn } from ‘@tauri-apps/plugin-log’; |
options ? | LogOptions | - |
Returns
Promise
<void
>
Source: https://github.com/tauri-apps/plugins-workspace/blob/v2/plugins/log/guest-js/index.ts#L113
© 2024 Tauri Contributors. CC-BY / MIT