5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-02 21:10:54 +08:00
wails/v2/pkg/logger/logger.go
Lea Anthony afea1cbb4c
Support SetLogLevel() at runtime
Refactor of loglevel
2020-10-10 07:31:23 +11:00

37 lines
663 B
Go

package logger
// LogLevel is an unsigned 8bit int
type LogLevel uint8
const (
// TRACE level
TRACE LogLevel = 0
// DEBUG level logging
DEBUG LogLevel = 1
// INFO level logging
INFO LogLevel = 2
// WARNING level logging
WARNING LogLevel = 3
// ERROR level logging
ERROR LogLevel = 4
// FATAL level logging
FATAL LogLevel = 5
)
// Logger specifies the methods required to attach
// a logger to a Wails application
type Logger interface {
Print(message string) error
Trace(message string) error
Debug(message string) error
Info(message string) error
Warning(message string) error
Error(message string) error
Fatal(message string) error
}