Add verbose flag for debug output control

Introduces log.Debug() function that respects a Verbose config flag, replacing direct [debug] fmt.Fprintf calls throughout the codebase. This allows debug logging to be toggled via -v/--verbose CLI flag.
This commit is contained in:
AI Bot
2026-04-19 11:06:52 +02:00
committed by Riyyi
parent 1dffd70db2
commit c90d2e8916
8 changed files with 90 additions and 70 deletions
+10
View File
@@ -11,6 +11,16 @@ import (
// -----------------------------------------
var logFile *os.File
var Verbose bool
// -----------------------------------------
func Debug(format string, args ...interface{}) {
if !Verbose {
return
}
fmt.Fprintf(os.Stderr, "[debug] "+format+"\n", args...)
}
// -----------------------------------------