Add fiber logger
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/gofiber/fiber/v3"
|
"github.com/gofiber/fiber/v3"
|
||||||
|
"github.com/gofiber/fiber/v3/middleware/logger"
|
||||||
|
|
||||||
_ "embed"
|
_ "embed"
|
||||||
)
|
)
|
||||||
@@ -67,6 +68,9 @@ func main() {
|
|||||||
as = AssociationService{db: &db}
|
as = AssociationService{db: &db}
|
||||||
|
|
||||||
app := fiber.New()
|
app := fiber.New()
|
||||||
|
app.Use(logger.New(logger.Config{
|
||||||
|
Format: "[${ip}]:${port} ${status} - ${method} ${path}\n",
|
||||||
|
}))
|
||||||
|
|
||||||
app.Post("/note/new", CreateNote)
|
app.Post("/note/new", CreateNote)
|
||||||
app.Get("/player/:name", GetPlayer)
|
app.Get("/player/:name", GetPlayer)
|
||||||
|
Reference in New Issue
Block a user