|
@@ -19,13 +19,14 @@ import (
|
|
// server starts a http server and returns a function to stop it
|
|
// server starts a http server and returns a function to stop it
|
|
func (app *App) server(config *app.Config) func() {
|
|
func (app *App) server(config *app.Config) func() {
|
|
engine := gin.New()
|
|
engine := gin.New()
|
|
-
|
|
|
|
- engine.Use(
|
|
|
|
- gin.LoggerWithConfig(gin.LoggerConfig{
|
|
|
|
|
|
+ if *config.HealthApiLogEnabled {
|
|
|
|
+ engine.Use(gin.Logger())
|
|
|
|
+ } else {
|
|
|
|
+ engine.Use(gin.LoggerWithConfig(gin.LoggerConfig{
|
|
SkipPaths: []string{"/health/check"},
|
|
SkipPaths: []string{"/health/check"},
|
|
- }),
|
|
|
|
- gin.Recovery(),
|
|
|
|
- )
|
|
|
|
|
|
+ }))
|
|
|
|
+ }
|
|
|
|
+ engine.Use(gin.Recovery())
|
|
engine.GET("/health/check", controllers.HealthCheck(config))
|
|
engine.GET("/health/check", controllers.HealthCheck(config))
|
|
|
|
|
|
endpointGroup := engine.Group("/e")
|
|
endpointGroup := engine.Group("/e")
|