1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

chore: exclude static assets from request logging

This commit is contained in:
Ferdinand Mütsch
2021-02-07 12:50:02 +01:00
parent b1c1f14e35
commit b0480356de
3 changed files with 20 additions and 7 deletions

View File

@@ -170,7 +170,10 @@ func main() {
// Globally used middlewares
recoveryMiddleware := handlers.RecoveryHandler()
loggingMiddleware := middlewares.NewLoggingMiddleware(log.New(os.Stdout, "", log.LstdFlags))
loggingMiddleware := middlewares.NewLoggingMiddleware(
log.New(os.Stdout, "", log.LstdFlags),
[]string{"/assets"},
)
// Router configs
router.Use(loggingMiddleware, recoveryMiddleware)