Skip to content

Commit

Permalink
feat: add user agent log
Browse files Browse the repository at this point in the history
  • Loading branch information
JingYiJun committed Jul 7, 2024
1 parent 7b7e1ef commit abffa7f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions middlewares.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ func MiddlewareCustomLogger(c *fiber.Ctx) error {
Str("method", c.Method()).
Str("origin_url", c.OriginalURL()).
Str("remote_ip", c.Get("X-Real-IP")).
Str("user_agent", c.Get("User-Agent", "")).
Int64("latency", latency)
if ok {
output = output.Int("user_id", userID)
Expand Down

0 comments on commit abffa7f

Please sign in to comment.