5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-10 05:02:36 +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 |
|-----------------|---------|-------|-----|-------|
| Browser | | | Y | |
| KV Store | | | Y | |
| Log | | | Y | |
| Single Instance | | | Y | |
| SQLite | | | Y | |
| Browser | Y | | Y | |
| KV Store | Y | | Y | |
| Log | Y | | Y | |
| Single Instance | Y | | Y | |
| SQLite | Y | | Y | |
| Start at login | | | Y | |
| 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:
```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
interface Hashes {
MD5: string;
SHA1: string;
SHA256: string;
}
- Trace
- Debug
- Info
- Warning
- 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