Remove RequestTime and ResponseTime from WFE log (#2708)

Fixes #2707.
This commit is contained in:
Jacob Hoffman-Andrews 2017-04-27 14:55:31 -07:00 committed by GitHub
parent 0282f9f48e
commit 8e80a22493
1 changed files with 11 additions and 16 deletions

View File

@ -4,7 +4,6 @@ import (
"encoding/json"
"fmt"
"net/http"
"time"
"golang.org/x/net/context"
@ -19,8 +18,6 @@ type requestEvent struct {
ClientAddr string `json:",omitempty"`
Endpoint string `json:",omitempty"`
Method string `json:",omitempty"`
RequestTime time.Time `json:",omitempty"`
ResponseTime time.Time `json:",omitempty"`
Errors []string
Requester int64 `json:",omitempty"`
Contacts *[]string `json:",omitempty"`
@ -58,7 +55,6 @@ func (th *topHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
RealIP: r.Header.Get("X-Real-IP"),
ClientAddr: getClientAddr(r),
Method: r.Method,
RequestTime: time.Now(),
UserAgent: r.Header.Get("User-Agent"),
Extra: make(map[string]interface{}, 0),
}
@ -69,7 +65,6 @@ func (th *topHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
}
func (th *topHandler) logEvent(logEvent *requestEvent) {
logEvent.ResponseTime = th.clk.Now()
var msg string
if len(logEvent.Errors) != 0 {
msg = "Terminated request"