walk and log chi routes, ocs cleanup (#5428)

* walk and log chi routes, ocs cleanup

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* make linter happy

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
Jörn Friedrich Dreyer
2023-01-23 12:30:34 +01:00
committed by GitHub
parent 473c64fe03
commit 32cc9beb0b
25 changed files with 59 additions and 681 deletions
+5
View File
@@ -45,6 +45,11 @@ func NewService(opts ...Option) Service {
r.Mount("/", svc.Static(options.Config.HTTP.CacheTTL))
})
_ = chi.Walk(m, func(method string, route string, handler http.Handler, middlewares ...func(http.Handler) http.Handler) error {
options.Logger.Debug().Str("method", method).Str("route", route).Int("middlewares", len(middlewares)).Msg("serving endpoint")
return nil
})
return svc
}