switched to different flag for sql debug
This commit is contained in:
3
main.go
3
main.go
@@ -28,6 +28,7 @@ var (
|
|||||||
repos []string
|
repos []string
|
||||||
db *ent.Client
|
db *ent.Client
|
||||||
journalLog = flag.Bool("journal", false, "Log to systemd journal instead of stdout")
|
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")
|
configFile = flag.String("config", "config.yaml", "set config file name/path")
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -77,7 +78,7 @@ func main() {
|
|||||||
}(db)
|
}(db)
|
||||||
}
|
}
|
||||||
|
|
||||||
if log.GetLevel() == log.DebugLevel {
|
if *sqlDebug {
|
||||||
db = db.Debug()
|
db = db.Debug()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user