)]}'
{"kolla/cmd/build.py":[{"author":{"_account_id":7488,"name":"Jeffrey Zhang","email":"zhang.lei.fly@gmail.com","username":"Jeffrey4l"},"change_message_id":"114f7c39a7b40590e02275f7de812a7623fef4d1","unresolved":false,"context_lines":[{"line_number":79,"context_line":"    except docker.errors.DockerException as ex:"},{"line_number":80,"context_line":"        LOG.exception(ex)"},{"line_number":81,"context_line":"        LOG.info(\u0027Cannot communicate with docker service. \u0027"},{"line_number":82,"context_line":"                 \u0027Please check if docker service is running without errors\u0027)"},{"line_number":83,"context_line":"        sys.exit(1)"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_91554cc8","line":82,"updated":"2016-03-07 08:45:25.000000000","message":"when need log the exception. please use\n\nLOG.exception(\u0027Can not comu....\u0027)\n\nthe ex.message is also logged in this way.","commit_id":"3ec7e06221b10d0cd52ee13fa4df0694e23b26be"},{"author":{"_account_id":7488,"name":"Jeffrey Zhang","email":"zhang.lei.fly@gmail.com","username":"Jeffrey4l"},"change_message_id":"b3dd24adce44b5f9e041112905ed9f4a34b0b488","unresolved":false,"context_lines":[{"line_number":79,"context_line":"    except docker.errors.DockerException as ex:"},{"line_number":80,"context_line":"        LOG.exception(ex)"},{"line_number":81,"context_line":"        LOG.info(\u0027Can not communicate with docker service. \u0027"},{"line_number":82,"context_line":"                 \u0027Please check if docker service is running without errors\u0027)"},{"line_number":83,"context_line":"        sys.exit(1)"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_ec0dd338","line":82,"updated":"2016-03-07 09:02:19.000000000","message":"I mean use one line\n     \n     LOG.exception(\u0027Can not communicate xxx\u0027)\n\nto replace two line (80-81)\n\n     LOG.excetion(ex)\n     LOG.info(\u0027Can not communicate xxxx\u0027)","commit_id":"d06a3c7e68abf36d960802a8efe5967d807c50c3"},{"author":{"_account_id":11105,"name":"Swapnil Kulkarni","email":"coolsvap@gmail.com","username":"coolsvap"},"change_message_id":"32787d1ce4ce5c6d10ae382c2d8ebb92a7853434","unresolved":false,"context_lines":[{"line_number":79,"context_line":"    except docker.errors.DockerException as ex:"},{"line_number":80,"context_line":"        LOG.exception(ex)"},{"line_number":81,"context_line":"        LOG.info(\u0027Can not communicate with docker service. \u0027"},{"line_number":82,"context_line":"                 \u0027Please check if docker service is running without errors\u0027)"},{"line_number":83,"context_line":"        sys.exit(1)"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5aef4532_17200c9b","line":82,"in_reply_to":"5aef4532_ec0dd338","updated":"2016-03-07 09:25:55.000000000","message":"sorry for the confusion. i wanted both info msg and exception log to be available.","commit_id":"d06a3c7e68abf36d960802a8efe5967d807c50c3"},{"author":{"_account_id":13998,"name":"Daniel Gonzalez Nothnagel","email":"daniel.gonzalez.nothnagel@sap.com","username":"dgonzalez"},"change_message_id":"6652a8dc3d5e92527ef8b0696f1e251168a29397","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        return docker.Client(version\u003d\u0027auto\u0027, **docker_kwargs)"},{"line_number":79,"context_line":"    except docker.errors.DockerException as ex:"},{"line_number":80,"context_line":"        LOG.exception(\u0027Can not communicate with docker service. Please check \u0027"},{"line_number":81,"context_line":"                      \u0027if docker service is running without errors \\n%s\u0027, ex)"},{"line_number":82,"context_line":"        sys.exit(1)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5aef4532_bcbad8be","line":81,"range":{"start_line":81,"start_character":67,"end_line":81,"end_character":69},"updated":"2016-03-07 10:51:37.000000000","message":"I do not know what\u0027s the policy of kolla for multiline logging, but i personally would prefer it if the log message would fit into a single line.","commit_id":"ed83c46b1019cbb0aaee3423c6377f8430d91175"},{"author":{"_account_id":7488,"name":"Jeffrey Zhang","email":"zhang.lei.fly@gmail.com","username":"Jeffrey4l"},"change_message_id":"c748eb8fdecd0915653d3594e689c47702240bf3","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        return docker.Client(version\u003d\u0027auto\u0027, **docker_kwargs)"},{"line_number":79,"context_line":"    except docker.errors.DockerException as ex:"},{"line_number":80,"context_line":"        LOG.exception(\u0027Can not communicate with docker service. Please check \u0027"},{"line_number":81,"context_line":"                      \u0027if docker service is running without errors \\n%s\u0027, ex)"},{"line_number":82,"context_line":"        sys.exit(1)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5aef4532_149bdcca","line":81,"updated":"2016-03-07 13:29:24.000000000","message":"So i think this will be better:\n\n    LOG.exception(\u0027Can not communicate with docker service. Please check\u0027\n                  \u0027 if docker service is running without errors\u0027)\n\nno need add the ex parameter\n\nsee the test here[0]. the ex parameter is meanless. Because the exception message is catched and logged by using LOG.exception","commit_id":"ed83c46b1019cbb0aaee3423c6377f8430d91175"},{"author":{"_account_id":13642,"name":"Vikram Hosakote","email":"vikram.ganesh@gmail.com","username":"vhosakot"},"change_message_id":"a27331d40fe7ea01e53a3008ba34c7002f6c84a5","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        return docker.Client(version\u003d\u0027auto\u0027, **docker_kwargs)"},{"line_number":79,"context_line":"    except docker.errors.DockerException as ex:"},{"line_number":80,"context_line":"        LOG.exception(\u0027Can not communicate with docker service. Please check \u0027"},{"line_number":81,"context_line":"                      \u0027if docker service is running without errors \\n%s\u0027, ex)"},{"line_number":82,"context_line":"        sys.exit(1)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5aef4532_f568dcbc","line":81,"in_reply_to":"5aef4532_149bdcca","updated":"2016-03-07 18:01:38.000000000","message":"Agreed. \"LOG.exception\" will print the exception traceback as well.","commit_id":"ed83c46b1019cbb0aaee3423c6377f8430d91175"},{"author":{"_account_id":13998,"name":"Daniel Gonzalez Nothnagel","email":"daniel.gonzalez.nothnagel@sap.com","username":"dgonzalez"},"change_message_id":"27a6e6a0f0d53b0608a6ee2d9cd19dc07de1bbfb","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        return docker.Client(version\u003d\u0027auto\u0027, **docker_kwargs)"},{"line_number":79,"context_line":"    except docker.errors.DockerException as ex:"},{"line_number":80,"context_line":"        LOG.exception(\u0027Can not communicate with docker service. Please check \u0027"},{"line_number":81,"context_line":"                      \u0027if docker service is running without errors \\n%s\u0027, ex)"},{"line_number":82,"context_line":"        sys.exit(1)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5aef4532_2b1157ad","line":81,"range":{"start_line":81,"start_character":67,"end_line":81,"end_character":69},"in_reply_to":"5aef4532_6b799f2f","updated":"2016-03-07 12:50:35.000000000","message":"That is a good idea in principle, but logging multiline entries breaks the format of the log. It\u0027s generally no big deal, but afaik it\u0027s considered bad practise to do that.\n\nYou could change the log message to something like\n\n  LOG.exception(\u0027Can not communicate with docker service: %s\u0027, ex)","commit_id":"ed83c46b1019cbb0aaee3423c6377f8430d91175"},{"author":{"_account_id":11105,"name":"Swapnil Kulkarni","email":"coolsvap@gmail.com","username":"coolsvap"},"change_message_id":"44817d4ff52e8974caefc27aa0766fa81e124bda","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        return docker.Client(version\u003d\u0027auto\u0027, **docker_kwargs)"},{"line_number":79,"context_line":"    except docker.errors.DockerException as ex:"},{"line_number":80,"context_line":"        LOG.exception(\u0027Can not communicate with docker service. Please check \u0027"},{"line_number":81,"context_line":"                      \u0027if docker service is running without errors \\n%s\u0027, ex)"},{"line_number":82,"context_line":"        sys.exit(1)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5aef4532_6b799f2f","line":81,"range":{"start_line":81,"start_character":67,"end_line":81,"end_character":69},"in_reply_to":"5aef4532_bcbad8be","updated":"2016-03-07 12:45:23.000000000","message":"Daniel, I am trying to separate the custom log message and exception obtained.","commit_id":"ed83c46b1019cbb0aaee3423c6377f8430d91175"},{"author":{"_account_id":13642,"name":"Vikram Hosakote","email":"vikram.ganesh@gmail.com","username":"vhosakot"},"change_message_id":"a34c49379d801fd61d8495675fb6dea66c834b00","unresolved":false,"context_lines":[{"line_number":76,"context_line":"    try:"},{"line_number":77,"context_line":"        docker_kwargs \u003d docker.utils.kwargs_from_env()"},{"line_number":78,"context_line":"        return docker.Client(version\u003d\u0027auto\u0027, **docker_kwargs)"},{"line_number":79,"context_line":"    except docker.errors.DockerException as ex:"},{"line_number":80,"context_line":"        LOG.exception(\u0027Can not communicate with docker service.\u0027"},{"line_number":81,"context_line":"                      \u0027Please check docker service is running without errors\u0027)"},{"line_number":82,"context_line":"        sys.exit(1)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5aef4532_5b78ccf2","line":79,"range":{"start_line":79,"start_character":41,"end_line":79,"end_character":43},"updated":"2016-03-08 03:25:56.000000000","message":"\"as ex\" is not needed here as the \"ex\" object is not used. Just \"except docker.errors.DockerException\" is good.\nRefer https://github.com/openstack/kolla/blob/master/kolla/cmd/build.py#L95.","commit_id":"1d36a2269cf3a84f67639759c71c67fb1de06325"},{"author":{"_account_id":7488,"name":"Jeffrey Zhang","email":"zhang.lei.fly@gmail.com","username":"Jeffrey4l"},"change_message_id":"205a19071eaba19f0cafa77d09828d1948f4eb72","unresolved":false,"context_lines":[{"line_number":76,"context_line":"    try:"},{"line_number":77,"context_line":"        docker_kwargs \u003d docker.utils.kwargs_from_env()"},{"line_number":78,"context_line":"        return docker.Client(version\u003d\u0027auto\u0027, **docker_kwargs)"},{"line_number":79,"context_line":"    except docker.errors.DockerException as ex:"},{"line_number":80,"context_line":"        LOG.exception(\u0027Can not communicate with docker service.\u0027"},{"line_number":81,"context_line":"                      \u0027Please check docker service is running without errors\u0027)"},{"line_number":82,"context_line":"        sys.exit(1)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5aef4532_ee6594e1","line":79,"updated":"2016-03-08 03:26:12.000000000","message":"no need add `as ex`.\n\nthe ex will not be used now.\n\nthe pep8 job will be failed.","commit_id":"1d36a2269cf3a84f67639759c71c67fb1de06325"}]}
