This repository has been archived on 2026-06-13. You can view files and clone it, but cannot push or open issues or pull requests.
anvillm/internal/debug/debug.go

16 lines
298 B
Go

package debug
import (
"anvillm/pkg/logging"
)
// Enabled controls whether debug logs are printed
var Enabled = false
// Log prints a log message only when debug mode is enabled
func Log(format string, args ...interface{}) {
if Enabled {
logging.Logger().Sugar().Infof(format, args...)
}
}