Commit 94951df1 by Mohit Gupta Committed by GitHub

API: Include IP address when logging request error (#21596)

Includes IP address when logging request error, for example 
when a user fails to login.

Fixes #21310
parent f9962eab
......@@ -47,7 +47,8 @@ func Wrap(action interface{}) macaron.Handler {
func (r *NormalResponse) WriteTo(ctx *m.ReqContext) {
if r.err != nil {
ctx.Logger.Error(r.errMessage, "error", r.err)
ctx.Logger.Error(r.errMessage, "error", r.err, "remote_addr", ctx.RemoteAddr())
}
header := ctx.Resp.Header()
......
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