rawlinp closed pull request #3141: Add additional response code information in 
responder.go.
URL: https://github.com/apache/trafficcontrol/pull/3141
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/grove/cache/responder.go b/grove/cache/responder.go
index 60b9b39a9..929f5190d 100644
--- a/grove/cache/responder.go
+++ b/grove/cache/responder.go
@@ -16,7 +16,6 @@ package cache
 
 import (
        "net/http"
-       "time"
 
        "github.com/apache/trafficcontrol/grove/cachedata"
        "github.com/apache/trafficcontrol/grove/plugin"
@@ -96,7 +95,7 @@ func (r *Responder) Do() {
        // TODO move plugins.BeforeRespond here? How do we distinguish between 
success, and know to set headers? r.OriginReqSuccess?
        bytesSent, err := r.F()
        if err != nil {
-               log.Errorln(time.Now().Format(time.RFC3339Nano) + " " + 
r.Req.RemoteAddr + " " + r.Req.Method + " " + r.Req.RequestURI + ": responding: 
" + err.Error())
+               log.Errorf("%s %s %s %v : responding: %v", r.Req.RemoteAddr, 
r.Req.Method, r.Req.RequestURI, r.ResponseCode, err.Error())
        }
        web.TryFlush(r.W) // TODO remove? Let plugins do it, if they need to?
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to