s3: add debug logs for commands

* initialize zerolog for commands
* Change default log format: remote colors and timestamp
This commit is contained in:
André Roth
2025-04-21 23:19:32 +02:00
parent e447fc0f1e
commit c07bf2b108
11 changed files with 188 additions and 25 deletions
+8
View File
@@ -123,6 +123,14 @@ func (context *AptlyContext) config() *utils.ConfigStructure {
}
}
if utils.Config.LogFormat == "json" {
context.StructuredLogging(true)
utils.SetupJSONLogger(utils.Config.LogLevel, os.Stdout)
} else {
context.StructuredLogging(false)
utils.SetupDefaultLogger(utils.Config.LogLevel)
}
context.configLoaded = true
}