Commit 51392b31 authored by Your Name's avatar Your Name

update log

parent dbf89dd4
......@@ -693,7 +693,7 @@ func main() {
cfg := slogfiber.Config{
WithUserAgent: true,
WithRequestID: true,
WithRequestBody: false,
WithRequestBody: true,
WithRequestHeader: true,
WithResponseBody: false,
WithResponseHeader: true,
......@@ -704,9 +704,9 @@ func main() {
_ = cfg
//app := fiber.New()
//app.Use(slogfiber.NewWithConfig(slog.Default(), cfg))
app.Use(slogfiber.NewWithConfig(slog.Default(), cfg))
app.Use(slogfiber.New(slog.Default()))
//app.Use(slogfiber.New(slog.Default()))
app.Use(recover.New())
apiGroup := app.Group("/api")
......@@ -762,6 +762,8 @@ func ApiOrJWT(c *fiber.Ctx) error {
reqHeaders := c.GetReqHeaders()
slogfiber.AddCustomAttributes(c, slog.String(TaskIdAtrr, reqHeaders[TaskIdAtrr][0]))
baseAttributes := []slog.Attr{}
baseAttributes = append(baseAttributes, slog.String(TaskIdAtrr, reqHeaders[TaskIdAtrr][0]))
newAttributes := append(baseAttributes, slog.String("match_path", c.Route().Path))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment