mirror of
https://github.com/muety/wakapi.git
synced 2023-08-10 21:12:56 +03:00
chore: log request durations (resolve #102)
This commit is contained in:
7
main.go
7
main.go
@@ -9,7 +9,9 @@ import (
|
||||
conf "github.com/muety/wakapi/config"
|
||||
"github.com/muety/wakapi/migrations/common"
|
||||
"github.com/muety/wakapi/repositories"
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
@@ -140,7 +142,10 @@ func main() {
|
||||
|
||||
// Middlewares
|
||||
recoveryMiddleware := handlers.RecoveryHandler()
|
||||
loggingMiddleware := middlewares.NewLoggingMiddleware().Handler
|
||||
loggingMiddleware := middlewares.NewLoggingMiddleware(
|
||||
// Use logbuch here once https://github.com/emvi/logbuch/issues/4 is realized
|
||||
log.New(os.Stdout, "", 0),
|
||||
)
|
||||
corsMiddleware := handlers.CORS()
|
||||
authenticateMiddleware := middlewares.NewAuthenticateMiddleware(
|
||||
userService,
|
||||
|
||||
Reference in New Issue
Block a user