5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-10 12:52:57 +08:00

[v3] Update status and log plugin readme

This commit is contained in:
Lea Anthony 2023-06-09 20:44:24 +10:00
parent 81a5380f67
commit 2b56b7b6b9
No known key found for this signature in database
GPG Key ID: 33DAF7BB90A58405
2 changed files with 27 additions and 14 deletions

View File

@ -269,11 +269,11 @@ Built-in plugin support:
| Plugin | Windows | Linux | Mac | Notes | | Plugin | Windows | Linux | Mac | Notes |
|-----------------|---------|-------|-----|-------| |-----------------|---------|-------|-----|-------|
| Browser | | | Y | | | Browser | Y | | Y | |
| KV Store | | | Y | | | KV Store | Y | | Y | |
| Log | | | Y | | | Log | Y | | Y | |
| Single Instance | | | Y | | | Single Instance | Y | | Y | |
| SQLite | | | Y | | | SQLite | Y | | Y | |
| Start at login | | | Y | | | Start at login | | | Y | |
| Server | | | | | | Server | | | | |

View File

@ -17,20 +17,33 @@ Add the plugin to the `Plugins` option in the Applications options:
You can then call the methods from the frontend: You can then call the methods from the frontend:
```js ```js
wails.Plugin("log","All","hello world").then((result) => console.log(result)) wails.Plugin("log","Debug","hello world")
``` ```
This method returns a struct with the following fields: ### Methods
```typescript - Trace
interface Hashes { - Debug
MD5: string; - Info
SHA1: string; - Warning
SHA256: string; - Error
} - Fatal
- SetLevel
SetLevel takes an integer value from JS:
```js
wails.Plugin("log","SetLevel",1)
``` ```
A TypeScript definition file is provided for this interface. Levels are:
- Trace: 1
- Debug: 2
- Info: 3
- Warning: 4
- Error: 5
- Fatal: 6
## Support ## Support