mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-09 20:41:42 +08:00
[v3] Update status and log plugin readme
This commit is contained in:
parent
81a5380f67
commit
2b56b7b6b9
10
v3/STATUS.md
10
v3/STATUS.md
@ -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 | | | | |
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user