Skip to content

Commit 1ca8a12

Browse files
committed
chore: add req_host field to web logs
1 parent 388022a commit 1ca8a12

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

web/gin/middleware/logger.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ func WebLogger(cond LogCondition) gin.HandlerFunc {
5353
js.PutString("type", config.BinName)
5454
js.PutString("req_time", start.Format(time.RFC3339))
5555
js.PutString("req_method", c.Request.Method)
56+
js.PutString("req_host", c.Request.Host)
5657
js.PutString("req_uri", c.Request.RequestURI)
5758
js.PutString("req_proto", c.Request.Proto)
5859
js.PutString("req_ua", c.Request.UserAgent())

0 commit comments

Comments
 (0)