Some logging added.

This change is untested!
This commit is contained in:
rony5394
2026-04-13 15:31:06 +02:00
parent 4a33358596
commit d0d5168fd2
7 changed files with 116 additions and 33 deletions

15
main.go
View File

@@ -5,6 +5,7 @@ import (
"github.com/rony5394/blazena/docker"
"github.com/rony5394/blazena/host"
cfg "github.com/rony5394/blazena/config"
"log/slog"
);
func main() {
@@ -12,7 +13,19 @@ func main() {
panic("Usage: blazena <mode>");
}
var config = cfg.GetConfig();
logger := slog.New(slog.NewTextHandler(os.Stdout, &slog.HandlerOptions{
Level: slog.LevelDebug,
}));
slog.SetDefault(logger);
config, err := cfg.GetConfig();
if(err != nil){
slog.Error("Failed to load config!", slog.Any("propagatedError", err.Error()));
os.Exit(1);
}
slog.Debug("Config", slog.Any("Value", config));
mode := os.Args[1];
switch mode {