Remove some debug logs (requested in review)
This commit is contained in:
parent
2a76a717e6
commit
64b78461f6
2 changed files with 1 additions and 3 deletions
|
@ -84,7 +84,7 @@ func (s *AccessLogSuite) TestAccessLog(c *check.C) {
|
||||||
c.Assert(count, checker.Equals, 3)
|
c.Assert(count, checker.Equals, 3)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Verify no other Trarfik problems
|
// Verify no other Traefik problems
|
||||||
if traefikLog, err := ioutil.ReadFile("traefik.log"); err != nil {
|
if traefikLog, err := ioutil.ReadFile("traefik.log"); err != nil {
|
||||||
c.Assert(err.Error(), checker.Equals, "")
|
c.Assert(err.Error(), checker.Equals, "")
|
||||||
} else if len(traefikLog) > 0 {
|
} else if len(traefikLog) > 0 {
|
||||||
|
|
|
@ -73,7 +73,6 @@ func (l *Logger) ServeHTTP(rw http.ResponseWriter, r *http.Request, next http.Ha
|
||||||
next(rw, r)
|
next(rw, r)
|
||||||
} else {
|
} else {
|
||||||
reqid := strconv.FormatUint(atomic.AddUint64(&reqidCounter, 1), 10)
|
reqid := strconv.FormatUint(atomic.AddUint64(&reqidCounter, 1), 10)
|
||||||
log.Debugf("Starting request %s: %s %s %s %s %s", reqid, r.Method, r.URL.RequestURI(), r.Proto, r.Referer(), r.UserAgent())
|
|
||||||
r.Header[loggerReqidHeader] = []string{reqid}
|
r.Header[loggerReqidHeader] = []string{reqid}
|
||||||
defer deleteReqid(r, reqid)
|
defer deleteReqid(r, reqid)
|
||||||
frontendBackendLoggingHandler{reqid, l.file, next}.ServeHTTP(rw, r)
|
frontendBackendLoggingHandler{reqid, l.file, next}.ServeHTTP(rw, r)
|
||||||
|
@ -82,7 +81,6 @@ func (l *Logger) ServeHTTP(rw http.ResponseWriter, r *http.Request, next http.Ha
|
||||||
|
|
||||||
// Delete a reqid from the map and the request's headers
|
// Delete a reqid from the map and the request's headers
|
||||||
func deleteReqid(r *http.Request, reqid string) {
|
func deleteReqid(r *http.Request, reqid string) {
|
||||||
log.Debugf("Ending request %s", reqid)
|
|
||||||
infoRwMap.Remove(reqid)
|
infoRwMap.Remove(reqid)
|
||||||
delete(r.Header, loggerReqidHeader)
|
delete(r.Header, loggerReqidHeader)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue