@@ -166,8 +166,8 @@ type HTTPRequest struct {
166
166
Status int `json:"status"`
167
167
ResponseSize string `json:"responseSize"`
168
168
UserAgent string `json:"userAgent"`
169
- RemoteIp string `json:"remoteIp"`
170
- ServerIp string `json:"serverIp"`
169
+ RemoteIP string `json:"remoteIp"`
170
+ ServerIP string `json:"serverIp"`
171
171
Referer string `json:"referer"`
172
172
Latency string `json:"latency"`
173
173
CacheLookup bool `json:"cacheLookup"`
@@ -196,8 +196,8 @@ func writeRequestLog(r *http.Request, config *Config, status int, responseSize i
196
196
Status : status ,
197
197
ResponseSize : fmt .Sprintf ("%d" , responseSize ),
198
198
UserAgent : r .UserAgent (),
199
- RemoteIp : getRemoteIp (r ),
200
- ServerIp : getServerIp (),
199
+ RemoteIP : getRemoteIP (r ),
200
+ ServerIP : getServerIP (),
201
201
Referer : r .Referer (),
202
202
Latency : fmt .Sprintf ("%fs" , elapsed .Seconds ()),
203
203
CacheLookup : false ,
@@ -220,12 +220,12 @@ func writeRequestLog(r *http.Request, config *Config, status int, responseSize i
220
220
return err
221
221
}
222
222
223
- func getRemoteIp (r * http.Request ) string {
223
+ func getRemoteIP (r * http.Request ) string {
224
224
parts := strings .Split (r .RemoteAddr , ":" )
225
225
return parts [0 ]
226
226
}
227
227
228
- func getServerIp () string {
228
+ func getServerIP () string {
229
229
ifaces , err := net .Interfaces ()
230
230
if err != nil {
231
231
return ""
0 commit comments