From 1be42ef9b6b45c76d3b0ee67e292cd90bbcd9e21 Mon Sep 17 00:00:00 2001 From: Giovanni Harting <539@idlegandalf.com> Date: Fri, 15 Dec 2023 19:41:23 +0100 Subject: [PATCH] switched to different flag for sql debug --- main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 35e4a40..f75fa63 100644 --- a/main.go +++ b/main.go @@ -28,6 +28,7 @@ var ( repos []string db *ent.Client journalLog = flag.Bool("journal", false, "Log to systemd journal instead of stdout") + sqlDebug = flag.Bool("sqldebug", false, "Enable SQL debug log") configFile = flag.String("config", "config.yaml", "set config file name/path") ) @@ -77,7 +78,7 @@ func main() { }(db) } - if log.GetLevel() == log.DebugLevel { + if *sqlDebug { db = db.Debug() }