5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-04 21:31:39 +08:00
wails/v3/plugins/log
2023-08-27 16:59:18 +10:00
..
plugin.go [v3] Tidy up plugin init 2023-08-19 17:09:38 +10:00
plugin.js [v3] Add CallByID method to runtime. 2023-08-27 16:59:18 +10:00
plugin.yaml [v3] plugin.toml -> plugin.yaml 2023-08-15 06:39:55 +10:00
README.md [v3] Update status and log plugin readme 2023-06-09 20:44:24 +10:00

log Plugin

This example plugin provides a way to generate hashes of strings.

Installation

Add the plugin to the Plugins option in the Applications options:

    Plugins: map[string]application.Plugin{
        "log": log.NewPlugin(),
    },

Usage

You can then call the methods from the frontend:

    wails.Plugin("log","Debug","hello world")

Methods

  • Trace
  • Debug
  • Info
  • Warning
  • Error
  • Fatal
  • SetLevel

SetLevel takes an integer value from JS:

    wails.Plugin("log","SetLevel",1)

Levels are:

  • Trace: 1
  • Debug: 2
  • Info: 3
  • Warning: 4
  • Error: 5
  • Fatal: 6

Support

If you find a bug in this plugin, please raise a ticket here. Please do not contact the Wails team for support.