[ARVADOS] updated: 0e5cd501a34ebcf6e138b4693f4fa4094bff24b4

git at public.curoverse.com git at public.curoverse.com
Tue Nov 18 14:02:00 EST 2014


Summary of changes:
 services/keepstore/logging_router.go | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

       via  0e5cd501a34ebcf6e138b4693f4fa4094bff24b4 (commit)
      from  97a2555a220d424b029d39b6b6e62f28bc3bc148 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 0e5cd501a34ebcf6e138b4693f4fa4094bff24b4
Author: radhika <radhika at curoverse.com>
Date:   Tue Nov 18 13:49:31 2014 -0500

    4194: use same log statement for successes as well as errors.

diff --git a/services/keepstore/logging_router.go b/services/keepstore/logging_router.go
index 6927019..fd4e234 100644
--- a/services/keepstore/logging_router.go
+++ b/services/keepstore/logging_router.go
@@ -21,7 +21,7 @@ func (loggingWriter *LoggingResponseWriter) WriteHeader(code int) {
 }
 
 func (loggingWriter *LoggingResponseWriter) Write(data []byte) (int, error) {
-	loggingWriter.Length = len(data)
+	loggingWriter.Length += len(data)
 	return loggingWriter.ResponseWriter.Write(data)
 }
 
@@ -37,9 +37,5 @@ func MakeLoggingRESTRouter() *LoggingRESTRouter {
 func (loggingRouter *LoggingRESTRouter) ServeHTTP(resp http.ResponseWriter, req *http.Request) {
 	loggingWriter := LoggingResponseWriter{200, 0, resp}
 	loggingRouter.router.ServeHTTP(&loggingWriter, req)
-	if loggingWriter.Status == 200 {
-		log.Printf("[%s] %s %s %d %d", req.RemoteAddr, req.Method, req.URL.Path[1:], loggingWriter.Status, loggingWriter.Length)
-	} else {
-		log.Printf("[%s] %s %s %d", req.RemoteAddr, req.Method, req.URL.Path[1:], loggingWriter.Status)
-	}
+	log.Printf("[%s] %s %s %d %d", req.RemoteAddr, req.Method, req.URL.Path[1:], loggingWriter.Status, loggingWriter.Length)
 }

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list