From c679797765ef2ee033ae86dcd87031eea2876a87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Schw=C3=B6rer?= Date: Mon, 11 Mar 2024 20:42:12 +0100 Subject: [PATCH] v0.0.410 add ginext.SuppressGinLogs --- ginext/engine.go | 3 ++- goextVersion.go | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ginext/engine.go b/ginext/engine.go index 59c33f4..07ce2f7 100644 --- a/ginext/engine.go +++ b/ginext/engine.go @@ -39,6 +39,7 @@ type ginRouteSpec struct { type Options struct { AllowCors *bool // Add cors handler to allow all CORS requests on the default http methods GinDebug *bool // Set gin.debug to true (adds more logs) + SuppressGinLogs *bool // Suppress our custom gin logs (even if GinDebug == true) BufferBody *bool // Buffers the input body stream, this way the ginext error handler can later include the whole request body Timeout *time.Duration // The default handler timeout ListenerBeforeRequest []func(g *gin.Context) // Register listener that are called before the handler method @@ -51,7 +52,7 @@ func NewEngine(opt Options) *GinWrapper { wrapper := &GinWrapper{ engine: engine, - suppressGinLogs: false, + suppressGinLogs: langext.Coalesce(opt.SuppressGinLogs, false), allowCors: langext.Coalesce(opt.AllowCors, false), ginDebug: langext.Coalesce(opt.GinDebug, true), bufferBody: langext.Coalesce(opt.BufferBody, false), diff --git a/goextVersion.go b/goextVersion.go index 12b2ba0..09c43ba 100644 --- a/goextVersion.go +++ b/goextVersion.go @@ -1,5 +1,5 @@ package goext -const GoextVersion = "0.0.409" +const GoextVersion = "0.0.410" -const GoextVersionTimestamp = "2024-03-11T17:05:10+0100" +const GoextVersionTimestamp = "2024-03-11T20:42:12+0100"