mirror of
https://github.com/woodchen-ink/webp_server_go.git
synced 2025-07-18 05:32:02 +08:00
add logger middleware to show response time
This commit is contained in:
parent
cedacd3997
commit
2a6492f0df
@ -9,6 +9,7 @@ import (
|
||||
"runtime"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v2/middleware/logger"
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
@ -102,6 +103,8 @@ Develop by WebP Server team. https://github.com/webp-sh`, version)
|
||||
ServerHeader: "Webp-Server-Go",
|
||||
DisableStartupMessage: true,
|
||||
})
|
||||
app.Use(logger.New())
|
||||
|
||||
listenAddress := config.Host + ":" + config.Port
|
||||
app.Get("/*", convert)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user