)]}'
{"swift/account/server.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"da21881f59f9984c3f90c9ec8ceb7359ca62c477","unresolved":false,"context_lines":[{"line_number":297,"context_line":"            additional_info \u003d \u0027\u0027"},{"line_number":298,"context_line":"            if res.headers.get(\u0027x-container-timestamp\u0027) is not None:"},{"line_number":299,"context_line":"                additional_info +\u003d \u0027x-container-timestamp: %s\u0027 % \\"},{"line_number":300,"context_line":"                    res.headers[\u0027x-container-timestamp\u0027]"},{"line_number":301,"context_line":"            log_msg \u003d get_log_line(req, res, trans_time, additional_info)"},{"line_number":302,"context_line":"            if req.method.upper() \u003d\u003d \u0027REPLICATE\u0027:"},{"line_number":303,"context_line":"                self.logger.debug(log_msg)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F9YOk%3D","line":300,"updated":"2014-04-04 23:54:04.000000000","message":"so this is really interesting, the logging of some set of extra headers is very cool - i could totally see adding this to the object server for x-storage-policy-index.\n\nSince we\u0027re screwing with the log format though I wonder if urlencode might be a more useful format for additional_info since it\u0027s already key/value based and it seems likely we\u0027ll want to include more than one header at some point in the future...  i guess proxy logging has sort of taken to the format of key:value[,key:value[,...]] - so maybe that instead (can\u0027t put \u0027,\u0027 in the value though :\\)","commit_id":"0f69da80b90f90750352bece38272e2a82260a55"}],"swift/common/utils.py":[{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"23b72fb218fa54931e69b313ea74777beab31292","unresolved":false,"context_lines":[{"line_number":299,"context_line":""},{"line_number":300,"context_line":"    :param req: the request."},{"line_number":301,"context_line":"    :param res: the response."},{"line_number":302,"context_line":"    :param trans_time: the time the request took to complete, a float."},{"line_number":303,"context_line":"    :param additional_info: a string to log at the end of the line"},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"    :returns: a properly formated line for logging."}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2BTCg%3D","line":302,"updated":"2014-03-27 19:37:35.000000000","message":"Can we pass the absolute start and stop times into this method, and add those to the log lines as well, like we did for the proxy server logging?\n\nI think it is important to keep interpretation of the information being logged inside the this function, rather than letting the callers derive it and pass it in for formatting.","commit_id":"0f69da80b90f90750352bece38272e2a82260a55"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"da21881f59f9984c3f90c9ec8ceb7359ca62c477","unresolved":false,"context_lines":[{"line_number":299,"context_line":""},{"line_number":300,"context_line":"    :param req: the request."},{"line_number":301,"context_line":"    :param res: the response."},{"line_number":302,"context_line":"    :param trans_time: the time the request took to complete, a float."},{"line_number":303,"context_line":"    :param additional_info: a string to log at the end of the line"},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"    :returns: a properly formated line for logging."}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F9YQo%3D","line":302,"in_reply_to":"AAAAWH%2F%2BQYg%3D","updated":"2014-04-04 23:54:04.000000000","message":"so i could see the signature of this function changing if we want to add fine grained log timing to the backend servers like we added to the proxy.  But that\u0027s probably a separate change?  I am a little worried about additional_info though.  If we want to add a field to all backend servers log lines do we add them before additional_info or I guess proxy logging decided on after it\u0027s \"log_info\" field...","commit_id":"0f69da80b90f90750352bece38272e2a82260a55"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"73d8adf3471123c2caff400b9231ae0fb8943039","unresolved":false,"context_lines":[{"line_number":299,"context_line":""},{"line_number":300,"context_line":"    :param req: the request."},{"line_number":301,"context_line":"    :param res: the response."},{"line_number":302,"context_line":"    :param trans_time: the time the request took to complete, a float."},{"line_number":303,"context_line":"    :param additional_info: a string to log at the end of the line"},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"    :returns: a properly formated line for logging."}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2BQYg%3D","line":302,"in_reply_to":"AAAAWH%2F%2BSC0%3D","updated":"2014-03-28 02:42:58.000000000","message":"So I was thinking that we pass get_log_line() start and end times, no calculation, and only calculate trans time in the object server from start and end when the slow calculation is necessary.\n\nCan we at least pass the end time in to get_log_line()?","commit_id":"0f69da80b90f90750352bece38272e2a82260a55"},{"author":{"_account_id":1009,"name":"Greg Lange","email":"greglange@gmail.com","username":"greglange"},"change_message_id":"733173dcb3541a9cf08548d95e1a6ff9c28f826b","unresolved":false,"context_lines":[{"line_number":299,"context_line":""},{"line_number":300,"context_line":"    :param req: the request."},{"line_number":301,"context_line":"    :param res: the response."},{"line_number":302,"context_line":"    :param trans_time: the time the request took to complete, a float."},{"line_number":303,"context_line":"    :param additional_info: a string to log at the end of the line"},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"    :returns: a properly formated line for logging."}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2BSC0%3D","line":302,"in_reply_to":"AAAAWH%2F%2BTCg%3D","updated":"2014-03-27 21:25:06.000000000","message":"In the object server, the trans_time is used in a place besides logging.  I\u0027d imagine we\u0027d want that use to match what is in the logs and we don\u0027t want to calculate it in get_log_line() and return it with the log line?","commit_id":"0f69da80b90f90750352bece38272e2a82260a55"}],"test/unit/obj/test_server.py":[{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"23b72fb218fa54931e69b313ea74777beab31292","unresolved":false,"context_lines":[{"line_number":3471,"context_line":"                    self.assertEqual("},{"line_number":3472,"context_line":"                        self.object_controller.logger.log_dict[\u0027info\u0027], [])"},{"line_number":3473,"context_line":""},{"line_number":3474,"context_line":"    def test_log_line_format(self):"},{"line_number":3475,"context_line":"        req \u003d Request.blank("},{"line_number":3476,"context_line":"            \u0027/sda1/p/a/c/o\u0027,"},{"line_number":3477,"context_line":"            environ\u003d{\u0027REQUEST_METHOD\u0027: \u0027HEAD\u0027, \u0027REMOTE_ADDR\u0027: \u00271.2.3.4\u0027})"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2BTAc%3D","line":3474,"updated":"2014-03-27 19:37:35.000000000","message":"Could we make a test base class that has this testing function with a parameterized URL?","commit_id":"0f69da80b90f90750352bece38272e2a82260a55"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"da21881f59f9984c3f90c9ec8ceb7359ca62c477","unresolved":false,"context_lines":[{"line_number":3471,"context_line":"                    self.assertEqual("},{"line_number":3472,"context_line":"                        self.object_controller.logger.log_dict[\u0027info\u0027], [])"},{"line_number":3473,"context_line":""},{"line_number":3474,"context_line":"    def test_log_line_format(self):"},{"line_number":3475,"context_line":"        req \u003d Request.blank("},{"line_number":3476,"context_line":"            \u0027/sda1/p/a/c/o\u0027,"},{"line_number":3477,"context_line":"            environ\u003d{\u0027REQUEST_METHOD\u0027: \u0027HEAD\u0027, \u0027REMOTE_ADDR\u0027: \u00271.2.3.4\u0027})"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F9YTs%3D","line":3474,"in_reply_to":"AAAAWH%2F%2BQZA%3D","updated":"2014-04-04 23:54:04.000000000","message":"I do love that post, and am not surprised I would have referenced it in a review although I don\u0027t recall the specific case where I thought it applied.  I should admit I personally tend to error on the side of little more copy-pasty with my tests... but I totally reserve the right to be hypocritically when it suits me.  :D\n\nIn this case I sort of agree with pete that the orthogonal-ity of the assertion would lend pretty well to a common test base.  I also agree with pete it\u0027s not worth holding up the change if that\u0027s the only issue.","commit_id":"0f69da80b90f90750352bece38272e2a82260a55"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"73d8adf3471123c2caff400b9231ae0fb8943039","unresolved":false,"context_lines":[{"line_number":3471,"context_line":"                    self.assertEqual("},{"line_number":3472,"context_line":"                        self.object_controller.logger.log_dict[\u0027info\u0027], [])"},{"line_number":3473,"context_line":""},{"line_number":3474,"context_line":"    def test_log_line_format(self):"},{"line_number":3475,"context_line":"        req \u003d Request.blank("},{"line_number":3476,"context_line":"            \u0027/sda1/p/a/c/o\u0027,"},{"line_number":3477,"context_line":"            environ\u003d{\u0027REQUEST_METHOD\u0027: \u0027HEAD\u0027, \u0027REMOTE_ADDR\u0027: \u00271.2.3.4\u0027})"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2BQZA%3D","line":3474,"in_reply_to":"AAAAWH%2F%2BSD0%3D","updated":"2014-03-28 02:42:58.000000000","message":"Thanks for pointing me at that post. I read that and can see that view point. In this case because we are trying to make sure that all servers always log the same way, it seems that it might be beneficial to use a single test methodology. I won\u0027t block it if you still feel otherwise.","commit_id":"0f69da80b90f90750352bece38272e2a82260a55"},{"author":{"_account_id":1009,"name":"Greg Lange","email":"greglange@gmail.com","username":"greglange"},"change_message_id":"733173dcb3541a9cf08548d95e1a6ff9c28f826b","unresolved":false,"context_lines":[{"line_number":3471,"context_line":"                    self.assertEqual("},{"line_number":3472,"context_line":"                        self.object_controller.logger.log_dict[\u0027info\u0027], [])"},{"line_number":3473,"context_line":""},{"line_number":3474,"context_line":"    def test_log_line_format(self):"},{"line_number":3475,"context_line":"        req \u003d Request.blank("},{"line_number":3476,"context_line":"            \u0027/sda1/p/a/c/o\u0027,"},{"line_number":3477,"context_line":"            environ\u003d{\u0027REQUEST_METHOD\u0027: \u0027HEAD\u0027, \u0027REMOTE_ADDR\u0027: \u00271.2.3.4\u0027})"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAWH%2F%2BSD0%3D","line":3474,"in_reply_to":"AAAAWH%2F%2BTAc%3D","updated":"2014-03-27 21:25:06.000000000","message":"Last time I did something like that in a test, Clay -1\u0027d it and pointed me in the direction of:\n\nhttp://stackoverflow.com/questions/6453235/what-does-damp-not-dry-mean-when-talking-about-unit-tests","commit_id":"0f69da80b90f90750352bece38272e2a82260a55"}]}
