Documentation ¶
Index ¶
- type Config
- type LogLevel
- type Plugin
- func (p *Plugin) CallableByJS() []string
- func (p *Plugin) Debug(message string, args ...any)
- func (p *Plugin) Error(message string, args ...any)
- func (p *Plugin) Fatal(message string, args ...any)
- func (p *Plugin) Info(message string, args ...any)
- func (p *Plugin) Init(app *application.App) error
- func (p *Plugin) InjectJS() string
- func (p *Plugin) Name() string
- func (p *Plugin) SetLevel(newLevel LogLevel)
- func (p *Plugin) Shutdown()
- func (p *Plugin) Trace(message string, args ...any)
- func (p *Plugin) Warning(message string, args ...any)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Where the logs are written to. Defaults to os.Stderr // If you want to write to a file, use os.OpenFile() // e.g. os.OpenFile("mylog.log", os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0666) // Closes the writer when the app shuts down Writer io.WriteCloser // The initial log level. Defaults to Debug Level LogLevel // Disables the log level prefixes DisablePrefix bool // Handles errors that occur when writing to the log ErrorHandler func(err error) }
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
func NewPluginWithConfig ¶
func (*Plugin) CallableByJS ¶
CallableByJS returns a list of methods that can be called from the frontend
func (*Plugin) Name ¶
Name returns the name of the plugin. You should use the go module format e.g. github.com/myuser/myplugin
Click to show internal directories.
Click to hide internal directories.