mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-04 04:11:56 +08:00
Support log level
This commit is contained in:
parent
93f4549efa
commit
90b7d5f519
@ -1,5 +1,27 @@
|
|||||||
package logger
|
package logger
|
||||||
|
|
||||||
|
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 = 4
|
||||||
|
|
||||||
|
// ERROR level logging
|
||||||
|
ERROR LogLevel = 8
|
||||||
|
|
||||||
|
// FATAL level logging
|
||||||
|
FATAL LogLevel = 16
|
||||||
|
)
|
||||||
|
|
||||||
type Logger interface {
|
type Logger interface {
|
||||||
Print(message string, args ...interface{}) error
|
Print(message string, args ...interface{}) error
|
||||||
Trace(message string, args ...interface{}) error
|
Trace(message string, args ...interface{}) error
|
||||||
|
@ -23,7 +23,8 @@ type App struct {
|
|||||||
DevTools bool
|
DevTools bool
|
||||||
RGBA int
|
RGBA int
|
||||||
Mac *mac.Options
|
Mac *mac.Options
|
||||||
Logger logger.Logger
|
Logger logger.Logger
|
||||||
|
LogLevel logger.LogLevel
|
||||||
}
|
}
|
||||||
|
|
||||||
// MergeDefaults will set the minimum default values for an application
|
// MergeDefaults will set the minimum default values for an application
|
||||||
|
Loading…
Reference in New Issue
Block a user