Skip to content

Commit

Permalink
Merge pull request kubernetes#5214 from brendandburns/agent
Browse files Browse the repository at this point in the history
Add user agent and source IP logging to the httpserver logs.
  • Loading branch information
nikhiljindal committed Mar 10, 2015
2 parents 6700a7f + a99f4f3 commit 25ff33a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/httplog/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func (rl *respLogger) Addf(format string, data ...interface{}) {
func (rl *respLogger) Log() {
latency := time.Since(rl.startTime)
if glog.V(2) {
glog.InfoDepth(1, fmt.Sprintf("%s %s: (%v) %v%v%v", rl.req.Method, rl.req.RequestURI, latency, rl.status, rl.statusStack, rl.addedInfo))
glog.InfoDepth(1, fmt.Sprintf("%s %s: (%v) %v%v%v [%s %s]", rl.req.Method, rl.req.RequestURI, latency, rl.status, rl.statusStack, rl.addedInfo, rl.req.Header["User-Agent"], rl.req.RemoteAddr))
}
}

Expand Down

0 comments on commit 25ff33a

Please sign in to comment.