From 2b56b7b6b9d60e57e0e82d13bf2679f741cfaad1 Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Fri, 9 Jun 2023 20:44:24 +1000 Subject: [PATCH] [v3] Update status and log plugin readme --- v3/STATUS.md | 10 +++++----- v3/plugins/log/README.md | 31 ++++++++++++++++++++++--------- 2 files changed, 27 insertions(+), 14 deletions(-) diff --git a/v3/STATUS.md b/v3/STATUS.md index 13a7b91a8..3b35a554a 100644 --- a/v3/STATUS.md +++ b/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 | | | | | diff --git a/v3/plugins/log/README.md b/v3/plugins/log/README.md index ae02ab72f..cd5f511e1 100644 --- a/v3/plugins/log/README.md +++ b/v3/plugins/log/README.md @@ -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