v0.0.462
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 3m32s

This commit is contained in:
2024-05-23 14:37:05 +02:00
parent 59963adf74
commit 62980e1489
4 changed files with 21 additions and 13 deletions

View File

@@ -72,20 +72,22 @@ func NewEngine(opt Options) *GinWrapper {
engine.Use(CorsMiddleware())
}
// do not debug-print routes
gin.DebugPrintRouteFunc = func(_, _, _ string, _ int) {}
if wrapper.ginDebug {
gin.SetMode(gin.DebugMode)
if !wrapper.ginDebug {
gin.SetMode(gin.ReleaseMode)
// do not debug-print routes
gin.DebugPrintRouteFunc = func(_, _, _ string, _ int) {}
if !wrapper.suppressGinLogs {
ginlogger := gin.Logger()
engine.Use(func(context *gin.Context) {
ginlogger(context)
})
engine.Use(func(context *gin.Context) { ginlogger(context) })
}
} else {
gin.SetMode(gin.DebugMode)
gin.SetMode(gin.ReleaseMode)
// do not debug-print routes
gin.DebugPrintRouteFunc = func(_, _, _ string, _ int) {}
}
return wrapper