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:
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 |
|
| 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 | | | | |
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user