)]}'
{"nova/api/openstack/placement/deploy.py":[{"author":{"_account_id":21813,"name":"Andrey Volkov","email":"m@amadev.ru","username":"avolkov"},"change_message_id":"ebd7c9357f08f17ddacde16e11c21119d6044cb7","unresolved":false,"context_lines":[{"line_number":54,"context_line":"                       microversion_middleware,"},{"line_number":55,"context_line":"                       fault_wrap,"},{"line_number":56,"context_line":"                       req_id_middleware,"},{"line_number":57,"context_line":"                       request_log,"},{"line_number":58,"context_line":"                       ):"},{"line_number":59,"context_line":"        application \u003d middleware(application)"},{"line_number":60,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a89bdaa_811e5f61","line":57,"updated":"2016-09-06 11:27:57.000000000","message":"Should we check somehow that RequestLog is outer middleware\nor at least leave a note?","commit_id":"345febe3216a9cb3eb16194c8df981a116a4f9d8"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"e518410917f3e94d85e2f149369b0e39139a7493","unresolved":false,"context_lines":[{"line_number":54,"context_line":"                       microversion_middleware,"},{"line_number":55,"context_line":"                       fault_wrap,"},{"line_number":56,"context_line":"                       req_id_middleware,"},{"line_number":57,"context_line":"                       request_log,"},{"line_number":58,"context_line":"                       ):"},{"line_number":59,"context_line":"        application \u003d middleware(application)"},{"line_number":60,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a89bdaa_17028d6f","line":57,"in_reply_to":"9a89bdaa_811e5f61","updated":"2016-09-06 11:38:01.000000000","message":"That\u0027s a good idea.\n\nFor the time being the middleware stack is not configurable (by design) but turning this particular one on or off may be desirable for the reasons you state in your toplevel comment.","commit_id":"345febe3216a9cb3eb16194c8df981a116a4f9d8"}],"nova/api/openstack/placement/handler.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"078785b03fe8f5ce6d31239e4cbef3d771517031","unresolved":false,"context_lines":[{"line_number":187,"context_line":"            LOG.exception(_LE(\"Uncaught exception\"))"},{"line_number":188,"context_line":"            raise"},{"line_number":189,"context_line":"        finally:"},{"line_number":190,"context_line":"            LOG.info(format_request_line(environ))"}],"source_content_type":"text/x-python","patch_set":1,"id":"da7fb54a_e4595490","side":"PARENT","line":190,"updated":"2016-09-02 15:43:20.000000000","message":"FWIW That\u0027s probably why we get a 200, given we use that finally clause. Couldn\u0027t we just with excutils.save_and_reraise_exception() ?","commit_id":"8f35bb321d26bd7d296c57f4188ec12fcde897c3"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"45ffdbee4a189d61b521b859f1ffeec0ff77012a","unresolved":false,"context_lines":[{"line_number":187,"context_line":"            LOG.exception(_LE(\"Uncaught exception\"))"},{"line_number":188,"context_line":"            raise"},{"line_number":189,"context_line":"        finally:"},{"line_number":190,"context_line":"            LOG.info(format_request_line(environ))"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a89bdaa_9fd29333","side":"PARENT","line":190,"in_reply_to":"da7fb54a_b62a1ee6","updated":"2016-09-02 19:26:40.000000000","message":"Oh I see, so we could maybe just copy the environ object, nope?","commit_id":"8f35bb321d26bd7d296c57f4188ec12fcde897c3"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"49a3cc2a98d2b96aaa64554a72da99d00a982bdd","unresolved":false,"context_lines":[{"line_number":187,"context_line":"            LOG.exception(_LE(\"Uncaught exception\"))"},{"line_number":188,"context_line":"            raise"},{"line_number":189,"context_line":"        finally:"},{"line_number":190,"context_line":"            LOG.info(format_request_line(environ))"}],"source_content_type":"text/x-python","patch_set":1,"id":"da7fb54a_b62a1ee6","side":"PARENT","line":190,"in_reply_to":"da7fb54a_e4595490","updated":"2016-09-02 17:28:36.000000000","message":"It turns out that part of the reason for the frequent 200s is that the Starting request log at line 160 is creating a resp object from an environ that hasn\u0027t done anything yet and thus is getting the 200 as the default status in the response object.","commit_id":"8f35bb321d26bd7d296c57f4188ec12fcde897c3"}],"nova/api/openstack/placement/requestlog.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4494191581bcfd0a14cddf5002891e424b217d4f","unresolved":false,"context_lines":[{"line_number":18,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"class RequestLog(object):"},{"line_number":22,"context_line":"    \"\"\""},{"line_number":23,"context_line":"    WSGI Middleware to write a simple request log to."},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"da7fb54a_e4aa3485","line":21,"updated":"2016-09-02 15:37:22.000000000","message":"Do we want unit tests to verify the behavior of the methods in here?","commit_id":"9ead461f32f3a0c51de6157304028aa92722a381"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"49a3cc2a98d2b96aaa64554a72da99d00a982bdd","unresolved":false,"context_lines":[{"line_number":18,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"class RequestLog(object):"},{"line_number":22,"context_line":"    \"\"\""},{"line_number":23,"context_line":"    WSGI Middleware to write a simple request log to."},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"da7fb54a_b6369eb2","line":21,"in_reply_to":"da7fb54a_e4aa3485","updated":"2016-09-02 17:28:36.000000000","message":"Yes, I suspect so. I pushed this up as a rush for the sake of getting working logging. If I\u0027m unable to get it fixed today (at this point unlikely) I\u0027ll tune it up on Monday while you guys are non labo[u]ring in honor of labo[u]r.","commit_id":"9ead461f32f3a0c51de6157304028aa92722a381"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"14e0ee16e109c77b16ffb440888d5d8f284480fd","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    Borrowed from Paste Translogger"},{"line_number":26,"context_line":"    \"\"\""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    format \u003d (\u0027%(REMOTE_ADDR)s \"%(REQUEST_METHOD)s %(REQUEST_URI)s\" \u0027"},{"line_number":29,"context_line":"              \u0027status: %(status)s len: %(bytes)s \u0027)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def __init__(self, application):"}],"source_content_type":"text/x-python","patch_set":1,"id":"da7fb54a_84eec8ea","line":28,"updated":"2016-09-02 15:36:58.000000000","message":"Since this is logged at INFO level it seems like it should be marked for translation with _LI, even though it wasn\u0027t before either. And it\u0027s not like it\u0027s going to be different in other languages...so probably OK to not mark it.","commit_id":"9ead461f32f3a0c51de6157304028aa92722a381"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"fafa9bf4e056a128d3493f6cb171a3cfc46d8643","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        LOG.debug(\u0027Starting request: %s \"%s %s\"\u0027 %"},{"line_number":36,"context_line":"                  (environ[\u0027REMOTE_ADDR\u0027], environ[\u0027REQUEST_METHOD\u0027],"},{"line_number":37,"context_line":"                   self._get_uri(environ)))"},{"line_number":38,"context_line":"        if LOG.isEnabledFor(logging.INFO):"},{"line_number":39,"context_line":"            return self._log_app(environ, start_response)"},{"line_number":40,"context_line":"        else:"},{"line_number":41,"context_line":"            return self.application(environ, start_response)"}],"source_content_type":"text/x-python","patch_set":1,"id":"da7fb54a_c408d094","line":38,"updated":"2016-09-02 15:41:00.000000000","message":"that means we only use that middleware if we use the INFO level ?","commit_id":"9ead461f32f3a0c51de6157304028aa92722a381"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"45ffdbee4a189d61b521b859f1ffeec0ff77012a","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        LOG.debug(\u0027Starting request: %s \"%s %s\"\u0027 %"},{"line_number":36,"context_line":"                  (environ[\u0027REMOTE_ADDR\u0027], environ[\u0027REQUEST_METHOD\u0027],"},{"line_number":37,"context_line":"                   self._get_uri(environ)))"},{"line_number":38,"context_line":"        if LOG.isEnabledFor(logging.INFO):"},{"line_number":39,"context_line":"            return self._log_app(environ, start_response)"},{"line_number":40,"context_line":"        else:"},{"line_number":41,"context_line":"            return self.application(environ, start_response)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a89bdaa_9f78d3fa","line":38,"in_reply_to":"da7fb54a_7676d63f","updated":"2016-09-02 19:26:40.000000000","message":"Okay, I see your point between access log vs.error log in HTTPD (or others).\n\nI think the point we\u0027re missing in the placement API is that we don\u0027t initialize the logging object like we should by calling .setup() with a scoped domain and a conf object.\nConsequently, there is no way to know whether the logger has correctly been created with all the level handlers and that\u0027s why you need to do this.\nIn a correct world, we should have initiated logging.setup() in the new WSGI handler that bootstraps the application so we could be 100% sure that this level is available.\n\nSee http://docs.openstack.org/developer/oslo.log/usage.html for further information.","commit_id":"9ead461f32f3a0c51de6157304028aa92722a381"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"49a3cc2a98d2b96aaa64554a72da99d00a982bdd","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        LOG.debug(\u0027Starting request: %s \"%s %s\"\u0027 %"},{"line_number":36,"context_line":"                  (environ[\u0027REMOTE_ADDR\u0027], environ[\u0027REQUEST_METHOD\u0027],"},{"line_number":37,"context_line":"                   self._get_uri(environ)))"},{"line_number":38,"context_line":"        if LOG.isEnabledFor(logging.INFO):"},{"line_number":39,"context_line":"            return self._log_app(environ, start_response)"},{"line_number":40,"context_line":"        else:"},{"line_number":41,"context_line":"            return self.application(environ, start_response)"}],"source_content_type":"text/x-python","patch_set":1,"id":"da7fb54a_7676d63f","line":38,"in_reply_to":"da7fb54a_a7d2ee32","updated":"2016-09-02 17:28:36.000000000","message":"What this does is make it so we don\u0027t have redundant logging if INFO is not. The wsgi application \"container\" is already doing request logging. If that is considered sufficient then I suppose it would be possible to turn the logging off.\n\nAs things currently stand what we get with this (and the previous version) when running in devstack is request logging in the apache error log and in the apache access log. The difference is that the format in the error log is not in the usual web request log format (used by web stats tools and the like) and includes the the request-id.\n\nBy turning it off here we avoid the logging code being run at all if it is not wanted. If we take it out, but disable the INFO loglevel then we\u0027ll still run the code that generates the log entry (after the request, the starting request always logs at debug level) but not write it.\n\nI\u0027m not clear on what the standards are for when and where to log stuff, so I\u0027m happy to adjust this to always run if that\u0027s what\u0027s the norm.","commit_id":"9ead461f32f3a0c51de6157304028aa92722a381"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"6a83d90542de5dab44bccfbe211ace1b5d353257","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        LOG.debug(\u0027Starting request: %s \"%s %s\"\u0027 %"},{"line_number":36,"context_line":"                  (environ[\u0027REMOTE_ADDR\u0027], environ[\u0027REQUEST_METHOD\u0027],"},{"line_number":37,"context_line":"                   self._get_uri(environ)))"},{"line_number":38,"context_line":"        if LOG.isEnabledFor(logging.INFO):"},{"line_number":39,"context_line":"            return self._log_app(environ, start_response)"},{"line_number":40,"context_line":"        else:"},{"line_number":41,"context_line":"            return self.application(environ, start_response)"}],"source_content_type":"text/x-python","patch_set":1,"id":"da7fb54a_a7d2ee32","line":38,"in_reply_to":"da7fb54a_c408d094","updated":"2016-09-02 15:54:00.000000000","message":"TBC, I don\u0027t think that is really needed?","commit_id":"9ead461f32f3a0c51de6157304028aa92722a381"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"2f3ca519a683255fb3c5269647ca8cbe87a0a220","unresolved":false,"context_lines":[{"line_number":63,"context_line":"            self.write_log(environ, req_uri, status, size)"},{"line_number":64,"context_line":"            return start_response(status, headers, exc_info)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        return self.application(environ, replacement_start_response)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    def write_log(self, environ, req_uri, status, size):"},{"line_number":69,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"da7fb54a_c7d45249","line":66,"updated":"2016-09-02 15:53:19.000000000","message":"very classical WSGI middleware, can\u0027t find any problem with it.","commit_id":"9ead461f32f3a0c51de6157304028aa92722a381"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"14e0ee16e109c77b16ffb440888d5d8f284480fd","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        if size is None:"},{"line_number":73,"context_line":"            size \u003d \u0027-\u0027"},{"line_number":74,"context_line":"        log_format \u003d {"},{"line_number":75,"context_line":"                \u0027REMOTE_ADDR\u0027: environ.get(\u0027REMOTE_ADDR\u0027) or \u0027-\u0027,"},{"line_number":76,"context_line":"                \u0027REQUEST_METHOD\u0027: environ[\u0027REQUEST_METHOD\u0027],"},{"line_number":77,"context_line":"                \u0027REQUEST_URI\u0027: req_uri,"},{"line_number":78,"context_line":"                \u0027status\u0027: status.split(None, 1)[0],"}],"source_content_type":"text/x-python","patch_set":1,"id":"da7fb54a_042b9831","line":75,"updated":"2016-09-02 15:36:58.000000000","message":"nit: alignment looks like it\u0027s 1 tab too many","commit_id":"9ead461f32f3a0c51de6157304028aa92722a381"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"49a3cc2a98d2b96aaa64554a72da99d00a982bdd","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        if size is None:"},{"line_number":73,"context_line":"            size \u003d \u0027-\u0027"},{"line_number":74,"context_line":"        log_format \u003d {"},{"line_number":75,"context_line":"                \u0027REMOTE_ADDR\u0027: environ.get(\u0027REMOTE_ADDR\u0027) or \u0027-\u0027,"},{"line_number":76,"context_line":"                \u0027REQUEST_METHOD\u0027: environ[\u0027REQUEST_METHOD\u0027],"},{"line_number":77,"context_line":"                \u0027REQUEST_URI\u0027: req_uri,"},{"line_number":78,"context_line":"                \u0027status\u0027: status.split(None, 1)[0],"}],"source_content_type":"text/x-python","patch_set":1,"id":"da7fb54a_f698266d","line":75,"in_reply_to":"da7fb54a_042b9831","updated":"2016-09-02 17:28:36.000000000","message":"yah, will fix this when I add the unit tests.","commit_id":"9ead461f32f3a0c51de6157304028aa92722a381"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"53aea55f3c6fe8a3dbf6ac39df8752dcbc990b82","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        LOG.debug(\u0027Starting request: %s \"%s %s\"\u0027 %"},{"line_number":35,"context_line":"                  (environ[\u0027REMOTE_ADDR\u0027], environ[\u0027REQUEST_METHOD\u0027],"},{"line_number":36,"context_line":"                   self._get_uri(environ)))"},{"line_number":37,"context_line":"        if LOG.isEnabledFor(logging.INFO):"},{"line_number":38,"context_line":"            return self._log_app(environ, start_response)"},{"line_number":39,"context_line":"        else:"},{"line_number":40,"context_line":"            return self.application(environ, start_response)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a89bdaa_bfc037e2","line":37,"updated":"2016-09-02 19:28:25.000000000","message":"Restating my point in PS1 :\nI think the point we\u0027re missing in the placement API is that we don\u0027t initialize the logging object like we should by calling .setup() with a scoped domain and a conf object.\nConsequently, there is no way to know whether the logger has correctly been created with all the level handlers and that\u0027s why you need to do this.\nIn a correct world, we should have initiated logging.setup() in the new WSGI handler that bootstraps the application so we could be 100% sure that this level is available and consequently we wouldn\u0027t need to verify that here.\n\nSee http://docs.openstack.org/developer/oslo.log/usage.html for further information.","commit_id":"4d51fbcb568c37518325814383b0976b1adcb2bf"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"04ee1a5c3d5d11816e9ca416919ac9cc7b65d226","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        LOG.debug(\u0027Starting request: %s \"%s %s\"\u0027 %"},{"line_number":35,"context_line":"                  (environ[\u0027REMOTE_ADDR\u0027], environ[\u0027REQUEST_METHOD\u0027],"},{"line_number":36,"context_line":"                   self._get_uri(environ)))"},{"line_number":37,"context_line":"        if LOG.isEnabledFor(logging.INFO):"},{"line_number":38,"context_line":"            return self._log_app(environ, start_response)"},{"line_number":39,"context_line":"        else:"},{"line_number":40,"context_line":"            return self.application(environ, start_response)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a89bdaa_19a4db55","line":37,"in_reply_to":"9a89bdaa_bfc037e2","updated":"2016-09-02 23:31:13.000000000","message":"Sean has established and initial setup in wsgi.py, which is the only entry to the placement service: https://github.com/openstack/nova/blob/master/nova/api/openstack/placement/wsgi.py#L30\n\nThat\u0027s the place where some of the tweaks you\u0027re talking about happen, and where any others that need to happen but aren\u0027t, would be added.\n\nIf, in that code, there was a way to turn off info for this module, then that would effectively turn off request logging in a way that not just avoided the writing of the log but also the creation of the log message.\n\nIs that something people need to do? I don\u0027t know, but the option is there if we want it.","commit_id":"4d51fbcb568c37518325814383b0976b1adcb2bf"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"b28002bb92b7f63f6e3b604f89d2f91f0b813d64","unresolved":false,"context_lines":[{"line_number":24,"context_line":"    Borrowed from Paste Translogger"},{"line_number":25,"context_line":"    \"\"\""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    format \u003d (\u0027%(REMOTE_ADDR)s \"%(REQUEST_METHOD)s %(REQUEST_URI)s\" \u0027"},{"line_number":28,"context_line":"              \u0027status: %(status)s len: %(bytes)s\u0027)"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    def __init__(self, application):"},{"line_number":31,"context_line":"        self.application \u003d application"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a89bdaa_8cff81a9","line":28,"range":{"start_line":27,"start_character":13,"end_line":28,"end_character":50},"updated":"2016-09-06 08:03:56.000000000","message":"We should enable translation marker \u0027_LI\u0027 at here?","commit_id":"345febe3216a9cb3eb16194c8df981a116a4f9d8"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"e518410917f3e94d85e2f149369b0e39139a7493","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    \"\"\""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    format \u003d (\u0027%(REMOTE_ADDR)s \"%(REQUEST_METHOD)s %(REQUEST_URI)s\" \u0027"},{"line_number":28,"context_line":"              \u0027status: %(status)s len: %(bytes)s\u0027)"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    def __init__(self, application):"},{"line_number":31,"context_line":"        self.application \u003d application"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a89bdaa_f79fe900","line":28,"in_reply_to":"9a89bdaa_81bf3ffa","updated":"2016-09-06 11:38:01.000000000","message":"We\u0027ve been hoping to avoid additional configuration in the placement api, as much as possible because the more configuration options there are the harder something is to manage and the more easy it is get it wrong.\n\nI think if people want configurable logging it is probably best to use the web server for that, and as you\u0027ve said elsewhere, turn this logging off.","commit_id":"345febe3216a9cb3eb16194c8df981a116a4f9d8"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"256404148637f3324358640494ed92a5e1f4e18e","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    \"\"\""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    format \u003d (\u0027%(REMOTE_ADDR)s \"%(REQUEST_METHOD)s %(REQUEST_URI)s\" \u0027"},{"line_number":28,"context_line":"              \u0027status: %(status)s len: %(bytes)s\u0027)"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    def __init__(self, application):"},{"line_number":31,"context_line":"        self.application \u003d application"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a89bdaa_af4d1774","line":28,"in_reply_to":"9a89bdaa_8cff81a9","updated":"2016-09-06 08:17:01.000000000","message":"We discussed this earlier in the process and it wasn\u0027t clear that translating status and len (and presumably microversion if we add that) is worth it?","commit_id":"345febe3216a9cb3eb16194c8df981a116a4f9d8"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"cdd011a49bc98d5b600d9c130886761b6ba66c84","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    \"\"\""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    format \u003d (\u0027%(REMOTE_ADDR)s \"%(REQUEST_METHOD)s %(REQUEST_URI)s\" \u0027"},{"line_number":28,"context_line":"              \u0027status: %(status)s len: %(bytes)s\u0027)"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    def __init__(self, application):"},{"line_number":31,"context_line":"        self.application \u003d application"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a89bdaa_bdb9cdcd","line":28,"in_reply_to":"9a89bdaa_af4d1774","updated":"2016-09-06 08:54:52.000000000","message":"yes, I have same feeling...i\u0027m not sure status and len whether worth to translation also. I\u0027m ok with both way actually.","commit_id":"345febe3216a9cb3eb16194c8df981a116a4f9d8"},{"author":{"_account_id":21813,"name":"Andrey Volkov","email":"m@amadev.ru","username":"avolkov"},"change_message_id":"ebd7c9357f08f17ddacde16e11c21119d6044cb7","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    \"\"\""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    format \u003d (\u0027%(REMOTE_ADDR)s \"%(REQUEST_METHOD)s %(REQUEST_URI)s\" \u0027"},{"line_number":28,"context_line":"              \u0027status: %(status)s len: %(bytes)s\u0027)"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    def __init__(self, application):"},{"line_number":31,"context_line":"        self.application \u003d application"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a89bdaa_81bf3ffa","line":28,"in_reply_to":"9a89bdaa_bdb9cdcd","updated":"2016-09-06 11:27:57.000000000","message":"The most questionable thing for me. Do we have possibility to move format string into configuration to allow user to choose \nwhat he wants to see in logs?","commit_id":"345febe3216a9cb3eb16194c8df981a116a4f9d8"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"b28002bb92b7f63f6e3b604f89d2f91f0b813d64","unresolved":false,"context_lines":[{"line_number":31,"context_line":"        self.application \u003d application"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    def __call__(self, environ, start_response):"},{"line_number":34,"context_line":"        LOG.debug(\u0027Starting request: %s \"%s %s\"\u0027 %"},{"line_number":35,"context_line":"                  (environ[\u0027REMOTE_ADDR\u0027], environ[\u0027REQUEST_METHOD\u0027],"},{"line_number":36,"context_line":"                   self._get_uri(environ)))"},{"line_number":37,"context_line":"        if LOG.isEnabledFor(logging.INFO):"},{"line_number":38,"context_line":"            return self._log_app(environ, start_response)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a89bdaa_0c2a912c","line":35,"range":{"start_line":34,"start_character":8,"end_line":35,"end_character":69},"updated":"2016-09-06 08:03:56.000000000","message":"nit,  we should use LOG.debug(\u0027......\u0027, (var1, var2))","commit_id":"345febe3216a9cb3eb16194c8df981a116a4f9d8"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"256404148637f3324358640494ed92a5e1f4e18e","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    def __call__(self, environ, start_response):"},{"line_number":34,"context_line":"        LOG.debug(\u0027Starting request: %s \"%s %s\"\u0027 %"},{"line_number":35,"context_line":"                  (environ[\u0027REMOTE_ADDR\u0027], environ[\u0027REQUEST_METHOD\u0027],"},{"line_number":36,"context_line":"                   self._get_uri(environ)))"},{"line_number":37,"context_line":"        if LOG.isEnabledFor(logging.INFO):"},{"line_number":38,"context_line":"            return self._log_app(environ, start_response)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a89bdaa_4f0f2b2e","line":35,"in_reply_to":"9a89bdaa_0c2a912c","updated":"2016-09-06 08:17:01.000000000","message":"yeah, will get","commit_id":"345febe3216a9cb3eb16194c8df981a116a4f9d8"},{"author":{"_account_id":21813,"name":"Andrey Volkov","email":"m@amadev.ru","username":"avolkov"},"change_message_id":"ebd7c9357f08f17ddacde16e11c21119d6044cb7","unresolved":false,"context_lines":[{"line_number":57,"context_line":"            size \u003d None"},{"line_number":58,"context_line":"            for name, value in headers:"},{"line_number":59,"context_line":"                if name.lower() \u003d\u003d \u0027content-length\u0027:"},{"line_number":60,"context_line":"                    size \u003d value"},{"line_number":61,"context_line":"            self.write_log(environ, req_uri, status, size)"},{"line_number":62,"context_line":"            return start_response(status, headers, exc_info)"},{"line_number":63,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a89bdaa_9cc0822c","line":60,"updated":"2016-09-06 11:27:57.000000000","message":"I think it should be environ.get(\u0027CONTENT_LENGTH\u0027) with appropriate checking.","commit_id":"345febe3216a9cb3eb16194c8df981a116a4f9d8"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"e518410917f3e94d85e2f149369b0e39139a7493","unresolved":false,"context_lines":[{"line_number":57,"context_line":"            size \u003d None"},{"line_number":58,"context_line":"            for name, value in headers:"},{"line_number":59,"context_line":"                if name.lower() \u003d\u003d \u0027content-length\u0027:"},{"line_number":60,"context_line":"                    size \u003d value"},{"line_number":61,"context_line":"            self.write_log(environ, req_uri, status, size)"},{"line_number":62,"context_line":"            return start_response(status, headers, exc_info)"},{"line_number":63,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a89bdaa_b74ac181","line":60,"in_reply_to":"9a89bdaa_9cc0822c","updated":"2016-09-06 11:38:01.000000000","message":"CONTENT_LENGTH in the environ is the length of the request body and will only be present some of the time (usually on the P* methods). The value we are after here is the length of the response body. The way to get that in a implementation independent fashion is by looking at the headers.","commit_id":"345febe3216a9cb3eb16194c8df981a116a4f9d8"},{"author":{"_account_id":21813,"name":"Andrey Volkov","email":"m@amadev.ru","username":"avolkov"},"change_message_id":"1627111a1ad30db3fbaaf59d7d4e96e5d0680743","unresolved":false,"context_lines":[{"line_number":57,"context_line":"            size \u003d None"},{"line_number":58,"context_line":"            for name, value in headers:"},{"line_number":59,"context_line":"                if name.lower() \u003d\u003d \u0027content-length\u0027:"},{"line_number":60,"context_line":"                    size \u003d value"},{"line_number":61,"context_line":"            self.write_log(environ, req_uri, status, size)"},{"line_number":62,"context_line":"            return start_response(status, headers, exc_info)"},{"line_number":63,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a89bdaa_1322a0b9","line":60,"in_reply_to":"9a89bdaa_b74ac181","updated":"2016-09-06 11:55:44.000000000","message":"Oops, you are right, missed that.","commit_id":"345febe3216a9cb3eb16194c8df981a116a4f9d8"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"b28002bb92b7f63f6e3b604f89d2f91f0b813d64","unresolved":false,"context_lines":[{"line_number":73,"context_line":"                \u0027REQUEST_METHOD\u0027: environ[\u0027REQUEST_METHOD\u0027],"},{"line_number":74,"context_line":"                \u0027REQUEST_URI\u0027: req_uri,"},{"line_number":75,"context_line":"                \u0027status\u0027: status.split(None, 1)[0],"},{"line_number":76,"context_line":"                \u0027bytes\u0027: size,"},{"line_number":77,"context_line":"        }"},{"line_number":78,"context_line":"        # We don\u0027t need to worry about trying to avoid the cost of"},{"line_number":79,"context_line":"        # interpolation here because we only reach this code if INFO"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a89bdaa_eccacda0","line":76,"range":{"start_line":76,"start_character":16,"end_line":76,"end_character":30},"updated":"2016-09-06 08:03:56.000000000","message":"Is it worth to log Microversion?","commit_id":"345febe3216a9cb3eb16194c8df981a116a4f9d8"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"256404148637f3324358640494ed92a5e1f4e18e","unresolved":false,"context_lines":[{"line_number":73,"context_line":"                \u0027REQUEST_METHOD\u0027: environ[\u0027REQUEST_METHOD\u0027],"},{"line_number":74,"context_line":"                \u0027REQUEST_URI\u0027: req_uri,"},{"line_number":75,"context_line":"                \u0027status\u0027: status.split(None, 1)[0],"},{"line_number":76,"context_line":"                \u0027bytes\u0027: size,"},{"line_number":77,"context_line":"        }"},{"line_number":78,"context_line":"        # We don\u0027t need to worry about trying to avoid the cost of"},{"line_number":79,"context_line":"        # interpolation here because we only reach this code if INFO"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a89bdaa_8c02210a","line":76,"in_reply_to":"9a89bdaa_eccacda0","updated":"2016-09-06 08:17:01.000000000","message":"good idea","commit_id":"345febe3216a9cb3eb16194c8df981a116a4f9d8"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"b28002bb92b7f63f6e3b604f89d2f91f0b813d64","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        # interpolation here because we only reach this code if INFO"},{"line_number":80,"context_line":"        # is enabled."},{"line_number":81,"context_line":"        message \u003d self.format % log_format"},{"line_number":82,"context_line":"        LOG.info(message)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a89bdaa_ccd6e926","line":82,"range":{"start_line":82,"start_character":8,"end_line":82,"end_character":25},"updated":"2016-09-06 08:03:56.000000000","message":"nit, better to use LOG.info(self.format, log_format)","commit_id":"345febe3216a9cb3eb16194c8df981a116a4f9d8"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"256404148637f3324358640494ed92a5e1f4e18e","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        # interpolation here because we only reach this code if INFO"},{"line_number":80,"context_line":"        # is enabled."},{"line_number":81,"context_line":"        message \u003d self.format % log_format"},{"line_number":82,"context_line":"        LOG.info(message)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a89bdaa_cf025b09","line":82,"in_reply_to":"9a89bdaa_ccd6e926","updated":"2016-09-06 08:17:01.000000000","message":"This is left over from the original (see \"Borrowed from Paste Translogger\"), but yeah, can tune that up.","commit_id":"345febe3216a9cb3eb16194c8df981a116a4f9d8"}]}
