update broker

This commit is contained in:
2025-07-22 00:04:52 +02:00
parent 941deaf9df
commit 8670442dbc
5 changed files with 175 additions and 110 deletions
+3 -1
View File
@@ -111,6 +111,8 @@ func NewApp(config ...Config) *App {
CreateTemplates: false,
}
slog.Debug("NewApp", "config", cfg)
if len(config) > 0 {
cfg = config[0]
if cfg.LogLevel == slog.LevelDebug {
@@ -380,7 +382,7 @@ func newLogger(level slog.Level) {
mw := io.MultiWriter(os.Stdout, f)
logger := slog.New(slog.NewTextHandler(mw, &slog.HandlerOptions{
AddSource: true,
AddSource: os.Getenv("ENV_MODE") == "" || os.Getenv("ENV_MODE") == "development",
Level: level,
}))