refactor: better request logging

This commit is contained in:
Deluan
2020-02-01 20:07:15 -05:00
parent e97d805444
commit 203754726b
4 changed files with 62 additions and 2 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ func New(scanner *scanner.Scanner, ds model.DataStore) *Server {
func (a *Server) MountRouter(path string, subRouter http.Handler) {
log.Info("Mounting routes", "path", path)
a.router.Group(func(r chi.Router) {
r.Use(middleware.Logger)
r.Use(RequestLogger)
r.Mount(path, subRouter)
})
}