rawlinp commented on code in PR #6881:
URL: https://github.com/apache/trafficcontrol/pull/6881#discussion_r888388655


##########
traffic_ops/traffic_ops_golang/routing/middleware/wrappers.go:
##########
@@ -212,7 +212,8 @@ func WrapAccessLog(secret string, h http.Handler) 
http.HandlerFunc {
                                        imsType = IMSMISS
                                }
                        }
-                       log.EventfRaw(`%s - %s [%s] "%v %v?%v %s" %v %v %v "%v" 
%v %s`, r.RemoteAddr, user, time.Now().Format(AccessLogTimeFormat), r.Method, 
r.URL.Path, r.URL.RawQuery, r.Proto, iw.Code, iw.ByteCount, 
int(time.Now().Sub(start)/time.Millisecond), r.UserAgent(), 
r.Context().Value(RouteID), imsType)
+                       routeID, _ := r.Context().Value(RouteID).(int)

Review Comment:
   Doh! This is actually being stored in the context as a string. So now it is 
always `0`. In routing.go L301 and 353, it's calling `strconv.Itoa`. We should 
change those lines to keep it stored as an int.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to