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