log: add detail of conn

This commit is contained in:
Gordon
2023-06-04 14:42:36 +08:00
parent fa274c2c40
commit 705e08a277
2 changed files with 15 additions and 1 deletions
+3
View File
@@ -56,6 +56,9 @@ func newContext(respWriter http.ResponseWriter, req *http.Request) *UserConnCont
ConnID: utils.Md5(req.RemoteAddr + "_" + strconv.Itoa(int(utils.GetCurrentTimestampByMill()))),
}
}
func (c *UserConnContext) GetRemoteAddr() string {
return c.RemoteAddr
}
func (c *UserConnContext) Query(key string) (string, bool) {
var value string
if value = c.Req.URL.Query().Get(key); value == "" {