feat: harden runtime import and frontend verification workflows
Some checks failed
CI / Build & Test (push) Has been cancelled
CI / Lint (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / Docker Build (push) Has been cancelled
CI / Release (push) Has been cancelled

This commit is contained in:
phamnazage-jpg
2026-06-04 20:02:36 +08:00
parent 7ce72cbc35
commit 77b7f7f660
32 changed files with 2657 additions and 109 deletions

View File

@@ -8,8 +8,8 @@ import (
"strings"
"time"
"log/slog"
"gopkg.in/natefinch/lumberjack.v2"
"log/slog"
)
var logger *slog.Logger
@@ -21,7 +21,7 @@ type Config struct {
Rotation bool // enable file rotation
MaxSize int // MB
MaxBackups int
MaxAge int // days
MaxAge int // days
Compress bool
}
@@ -75,7 +75,7 @@ func InitWithConfig(cfg Config) {
}
var handler slog.Handler
switch cfg.Output {
case "stdout":
handler = slog.NewJSONHandler(os.Stdout, opts)
@@ -100,7 +100,7 @@ func InitWithConfig(cfg Config) {
handler = slog.NewJSONHandler(file, opts)
}
}
logger = slog.New(handler)
slog.SetDefault(logger)
}