mirror of
https://github.com/woodchen-ink/webp_server_go.git
synced 2025-07-18 13:42: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"
|
"runtime"
|
||||||
|
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
|
"github.com/gofiber/fiber/v2/middleware/logger"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -102,6 +103,8 @@ Develop by WebP Server team. https://github.com/webp-sh`, version)
|
|||||||
ServerHeader: "Webp-Server-Go",
|
ServerHeader: "Webp-Server-Go",
|
||||||
DisableStartupMessage: true,
|
DisableStartupMessage: true,
|
||||||
})
|
})
|
||||||
|
app.Use(logger.New())
|
||||||
|
|
||||||
listenAddress := config.Host + ":" + config.Port
|
listenAddress := config.Host + ":" + config.Port
|
||||||
app.Get("/*", convert)
|
app.Get("/*", convert)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user