v0.0.410 add ginext.SuppressGinLogs
Some checks failed
Build Docker and Deploy / Run goext test-suite (push) Has been cancelled

This commit is contained in:
2024-03-11 20:42:12 +01:00
parent 401aad9fa4
commit c679797765
2 changed files with 4 additions and 3 deletions

View File

@@ -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),