feat(logs): Improved logging

This commit is contained in:
2025-08-06 11:15:57 +02:00
parent 15a37f3e8c
commit 09e7c36571
5 changed files with 73 additions and 9 deletions

View File

@@ -2,10 +2,10 @@ package main
import (
"flag"
"log"
"os"
"os/signal"
"github.com/charmbracelet/log"
"gitlab.com/gomidi/midi/v2"
)
@@ -29,7 +29,11 @@ func main() {
flag.BoolVar(&printDebugMsgs, "debug", false, "Print debug messages")
flag.Parse()
log.Println("Starting...")
if printDebugMsgs {
log.SetLevel(log.DebugLevel)
}
log.Info("Starting...")
config := must(ParseConfig(configPath))
controllerList := must(config.Construct())
defer controllerList.Stop()