Move the updateLogLevel in the main file in order to avoid gcsafe error

This commit is contained in:
Arnaud 2025-09-09 20:31:00 +02:00 committed by Eric
parent 86040b0853
commit e784eaea8e
No known key found for this signature in database

View File

@ -54,6 +54,16 @@ when isMainModule:
, ,
) )
config.setupLogging() config.setupLogging()
try:
updateLogLevel(config.logLevel)
except ValueError as err:
try:
stderr.write "Invalid value for --log-level. " & err.msg & "\n"
except IOError:
echo "Invalid value for --log-level. " & err.msg
quit QuitFailure
config.setupMetrics() config.setupMetrics()
if not (checkAndCreateDataDir((config.dataDir).string)): if not (checkAndCreateDataDir((config.dataDir).string)):