Skip to content

Commit

Permalink
log: ip and user agent
Browse files Browse the repository at this point in the history
  • Loading branch information
labasubagia committed Sep 15, 2023
1 parent 0f3e992 commit af778fa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/adapter/handler/restful/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ func (s *Server) Logger() gin.HandlerFunc {
}
logEvent.
Field("protocol", "http").
Field("client_ip", c.ClientIP()).
Field("user_agent", c.Request.UserAgent()).
Field("method", c.Request.Method).
Field("path", c.Request.URL.Path).
Field("status_code", c.Writer.Status()).
Expand Down

0 comments on commit af778fa

Please sign in to comment.