From e8558b89b4e46797f2a2103788cdb3515c1191ad Mon Sep 17 00:00:00 2001 From: Stavros Date: Mon, 22 Sep 2025 16:15:55 +0300 Subject: [PATCH] fix: set gin mode correctly --- internal/bootstrap/app_bootstrap.go | 8 ++++---- internal/service/oauth_broker_service.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/bootstrap/app_bootstrap.go b/internal/bootstrap/app_bootstrap.go index e92bb9a..81a55ad 100644 --- a/internal/bootstrap/app_bootstrap.go +++ b/internal/bootstrap/app_bootstrap.go @@ -188,6 +188,10 @@ func (app *BootstrapApp) Setup() error { } // Create engine + if config.Version != "development" { + gin.SetMode(gin.ReleaseMode) + } + engine := gin.New() if len(app.config.TrustedProxies) > 0 { @@ -198,10 +202,6 @@ func (app *BootstrapApp) Setup() error { } } - if config.Version != "development" { - gin.SetMode(gin.ReleaseMode) - } - // Create middlewares var middlewares []Middleware diff --git a/internal/service/oauth_broker_service.go b/internal/service/oauth_broker_service.go index e6c6ddb..178f9af 100644 --- a/internal/service/oauth_broker_service.go +++ b/internal/service/oauth_broker_service.go @@ -50,7 +50,7 @@ func (broker *OAuthBrokerService) Init() error { log.Error().Err(err).Msgf("Failed to initialize OAuth service: %T", name) return err } - log.Info().Msgf("Initialized OAuth service: %T", name) + log.Info().Str("service", service.GetName()).Msg("Initialized OAuth service") } return nil