5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-04 21:50:32 +08:00
wails/v3/plugins/log
2024-03-26 21:02:26 +11:00
..
plugin.go Update plugin example 2024-03-26 21:02:26 +11:00
plugin.js Update log plugin to have log levels. 2023-09-13 09:45:26 +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.