Switch remote deploy to vendored source builds
Move remote deployment to a vendored source bundle built on the target host via Docker so redeploys no longer require local cross-compilation or host Go installation. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
72
vendor/github.com/wailsapp/wails/v2/pkg/logger/logger.go
generated
vendored
Normal file
72
vendor/github.com/wailsapp/wails/v2/pkg/logger/logger.go
generated
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
package logger
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// LogLevel is an unsigned 8bit int
|
||||
type LogLevel uint8
|
||||
|
||||
const (
|
||||
// TRACE level
|
||||
TRACE LogLevel = 1
|
||||
|
||||
// DEBUG level logging
|
||||
DEBUG LogLevel = 2
|
||||
|
||||
// INFO level logging
|
||||
INFO LogLevel = 3
|
||||
|
||||
// WARNING level logging
|
||||
WARNING LogLevel = 4
|
||||
|
||||
// ERROR level logging
|
||||
ERROR LogLevel = 5
|
||||
)
|
||||
|
||||
var logLevelMap = map[string]LogLevel{
|
||||
"trace": TRACE,
|
||||
"debug": DEBUG,
|
||||
"info": INFO,
|
||||
"warning": WARNING,
|
||||
"error": ERROR,
|
||||
}
|
||||
|
||||
func StringToLogLevel(input string) (LogLevel, error) {
|
||||
result, ok := logLevelMap[strings.ToLower(input)]
|
||||
if !ok {
|
||||
return ERROR, fmt.Errorf("invalid log level: %s", input)
|
||||
}
|
||||
return result, nil
|
||||
}
|
||||
|
||||
// String returns the string representation of the LogLevel
|
||||
func (l LogLevel) String() string {
|
||||
switch l {
|
||||
case TRACE:
|
||||
return "trace"
|
||||
case DEBUG:
|
||||
return "debug"
|
||||
case INFO:
|
||||
return "info"
|
||||
case WARNING:
|
||||
return "warning"
|
||||
case ERROR:
|
||||
return "error"
|
||||
default:
|
||||
return "debug"
|
||||
}
|
||||
}
|
||||
|
||||
// Logger specifies the methods required to attach
|
||||
// a logger to a Wails application
|
||||
type Logger interface {
|
||||
Print(message string)
|
||||
Trace(message string)
|
||||
Debug(message string)
|
||||
Info(message string)
|
||||
Warning(message string)
|
||||
Error(message string)
|
||||
Fatal(message string)
|
||||
}
|
||||
Reference in New Issue
Block a user