)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":13478,"name":"Boris Bobrov","email":"b.bobrov@sap.com","username":"bbobrov"},"change_message_id":"8dfcdf875ea37b605edfc7d16338fb5d459e10b8","unresolved":false,"context_lines":[{"line_number":10,"context_line":"as the first argument to all of the log methods. If it receives"},{"line_number":11,"context_line":"something that is not a string, it tries to convert it to a string. The"},{"line_number":12,"context_line":"old logging ContextAdapter dealt with this transparently by using"},{"line_number":13,"context_line":"unicode(), but oslo.log on longer uses the ContextAdapter. Since the"},{"line_number":14,"context_line":"underlying code is using the equivalent of str(), we need to pass real"},{"line_number":15,"context_line":"string objects in to the log calls, instead of passing just exception"},{"line_number":16,"context_line":"objects."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"da86d52c_36dc2646","line":13,"updated":"2015-02-12 08:01:53.000000000","message":"Why can\u0027t we make that coercion in the new KeywordsAdapter?","commit_id":"1afa66163221efd943f84afc1c9125fa464afe43"},{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"3caf89bfc5ebda410c672cc879b2262f7badef7a","unresolved":false,"context_lines":[{"line_number":10,"context_line":"as the first argument to all of the log methods. If it receives"},{"line_number":11,"context_line":"something that is not a string, it tries to convert it to a string. The"},{"line_number":12,"context_line":"old logging ContextAdapter dealt with this transparently by using"},{"line_number":13,"context_line":"unicode(), but oslo.log on longer uses the ContextAdapter. Since the"},{"line_number":14,"context_line":"underlying code is using the equivalent of str(), we need to pass real"},{"line_number":15,"context_line":"string objects in to the log calls, instead of passing just exception"},{"line_number":16,"context_line":"objects."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"da86d52c_5cbef865","line":13,"updated":"2015-02-12 20:19:02.000000000","message":"nit: s/on/no/","commit_id":"aca494a5c083f0a24a5a81d6a1cc4e3f4a0e4057"}],"keystone/common/wsgi.py":[{"author":{"_account_id":13478,"name":"Boris Bobrov","email":"b.bobrov@sap.com","username":"bbobrov"},"change_message_id":"8dfcdf875ea37b605edfc7d16338fb5d459e10b8","unresolved":false,"context_lines":[{"line_number":240,"context_line":"            return render_exception(e, context\u003dcontext,"},{"line_number":241,"context_line":"                                    user_locale\u003dbest_match_language(req))"},{"line_number":242,"context_line":"        except exception.Error as e:"},{"line_number":243,"context_line":"            LOG.warning(_LW(\u0027Unexpected error: %s\u0027), e)"},{"line_number":244,"context_line":"            return render_exception(e, context\u003dcontext,"},{"line_number":245,"context_line":"                                    user_locale\u003dbest_match_language(req))"},{"line_number":246,"context_line":"        except TypeError as e:"}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_56f51aeb","line":243,"updated":"2015-02-12 08:01:53.000000000","message":"I think that \"Unexpected error\" is not a good message for the situation. The exception caught here can be `exceptions.DomainNotFound(\u0027Domain not found: {domain_id}\u0027)`. I think that a message from exception should be somehow reused.","commit_id":"1afa66163221efd943f84afc1c9125fa464afe43"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"06ce85d4538a372c1acb3a8695aff3de3f2da51e","unresolved":false,"context_lines":[{"line_number":240,"context_line":"            return render_exception(e, context\u003dcontext,"},{"line_number":241,"context_line":"                                    user_locale\u003dbest_match_language(req))"},{"line_number":242,"context_line":"        except exception.Error as e:"},{"line_number":243,"context_line":"            LOG.warning(_LW(\u0027Unexpected error: %s\u0027), e)"},{"line_number":244,"context_line":"            return render_exception(e, context\u003dcontext,"},{"line_number":245,"context_line":"                                    user_locale\u003dbest_match_language(req))"},{"line_number":246,"context_line":"        except TypeError as e:"}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_1dac87ec","line":243,"updated":"2015-02-12 16:48:40.000000000","message":"There should at least be a different message logged in each case, rather than the same message... e.g., this could be \u0027Unexpected error\u0027, change line 247 to be \u0027Unexpected validation error\u0027, and then \u0027Unexpected exception\u0027 at line 252.\n\nAlso, I wonder if all of these can\u0027t be changed to LOG.warning(_(\u0027%s\u0027), e) ... that should be the same as it was before, and %s must work since that\u0027s what it\u0027s doing here.","commit_id":"1afa66163221efd943f84afc1c9125fa464afe43"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"3dc907036dcf904585205e8add2f7b2a5bb8bcf7","unresolved":false,"context_lines":[{"line_number":240,"context_line":"            return render_exception(e, context\u003dcontext,"},{"line_number":241,"context_line":"                                    user_locale\u003dbest_match_language(req))"},{"line_number":242,"context_line":"        except exception.Error as e:"},{"line_number":243,"context_line":"            LOG.warning(_LW(\u0027Unexpected error: %s\u0027), e)"},{"line_number":244,"context_line":"            return render_exception(e, context\u003dcontext,"},{"line_number":245,"context_line":"                                    user_locale\u003dbest_match_language(req))"},{"line_number":246,"context_line":"        except TypeError as e:"}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_06b27493","line":243,"in_reply_to":"da86d52c_1dac87ec","updated":"2015-02-12 17:51:59.000000000","message":"The old code was actually doing : six.text_type(msg)\n\nhttp://git.openstack.org/cgit/openstack/keystone/tree/keystone/openstack/common/log.py#n318\n\nHow this works now: http://paste.openstack.org/show/172225/","commit_id":"1afa66163221efd943f84afc1c9125fa464afe43"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"d5675c3b13ee2fb4b8cabbfc340b0c941f068a70","unresolved":false,"context_lines":[{"line_number":240,"context_line":"            return render_exception(e, context\u003dcontext,"},{"line_number":241,"context_line":"                                    user_locale\u003dbest_match_language(req))"},{"line_number":242,"context_line":"        except exception.Error as e:"},{"line_number":243,"context_line":"            LOG.warning(_LW(\u0027Unexpected error: %s\u0027), e)"},{"line_number":244,"context_line":"            return render_exception(e, context\u003dcontext,"},{"line_number":245,"context_line":"                                    user_locale\u003dbest_match_language(req))"},{"line_number":246,"context_line":"        except TypeError as e:"}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_9d287898","line":243,"in_reply_to":"da86d52c_2246897b","updated":"2015-02-12 16:45:52.000000000","message":"I don\u0027t think that is what he is saying. The exception caught is exception.Error, which could be a DomainNotFound or any other subclass. The new message would hide what would have been a good message from those sub classes.","commit_id":"1afa66163221efd943f84afc1c9125fa464afe43"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"57a7d419dd00225fa2bb31454af10142c185b137","unresolved":false,"context_lines":[{"line_number":240,"context_line":"            return render_exception(e, context\u003dcontext,"},{"line_number":241,"context_line":"                                    user_locale\u003dbest_match_language(req))"},{"line_number":242,"context_line":"        except exception.Error as e:"},{"line_number":243,"context_line":"            LOG.warning(_LW(\u0027Unexpected error: %s\u0027), e)"},{"line_number":244,"context_line":"            return render_exception(e, context\u003dcontext,"},{"line_number":245,"context_line":"                                    user_locale\u003dbest_match_language(req))"},{"line_number":246,"context_line":"        except TypeError as e:"}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_2246897b","line":243,"in_reply_to":"da86d52c_56f51aeb","updated":"2015-02-12 16:25:58.000000000","message":"i\u0027m not sure i agree with you here, can you explain why you think it should changed to catch a domain exception? thats a change in behaviour (not just logging)","commit_id":"1afa66163221efd943f84afc1c9125fa464afe43"},{"author":{"_account_id":13478,"name":"Boris Bobrov","email":"b.bobrov@sap.com","username":"bbobrov"},"change_message_id":"f865799d462333873fad44f0d931e5dcec20e9d9","unresolved":false,"context_lines":[{"line_number":239,"context_line":"            return render_exception(e, context\u003dcontext,"},{"line_number":240,"context_line":"                                    user_locale\u003dbest_match_language(req))"},{"line_number":241,"context_line":"        except exception.Error as e:"},{"line_number":242,"context_line":"            LOG.warning(six.text_type(e))"},{"line_number":243,"context_line":"            return render_exception(e, context\u003dcontext,"},{"line_number":244,"context_line":"                                    user_locale\u003dbest_match_language(req))"},{"line_number":245,"context_line":"        except TypeError as e:"}],"source_content_type":"text/x-python","patch_set":8,"id":"da86d52c_b2062620","line":242,"updated":"2015-02-13 10:09:23.000000000","message":"I still don\u0027t quite understand why passing an exception shouldn\u0027t work. It works great with standard exceptions: http://paste.openstack.org/show/172788/ . I\u0027d say it\u0027s a bug in either oslo_i18n or oslo_log.\n\nI will not -1 it, but I will probably send a follow-up with fix to this explicit coercion.","commit_id":"a77b0145721f139bf1bb423c370b99f488e20824"}],"keystone/hacking/checks.py":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"058e6ae10b66d7ca6e0e28ab1ae6e1ffc2d7d4ec","unresolved":false,"context_lines":[{"line_number":338,"context_line":"            try:"},{"line_number":339,"context_line":"                func_name \u003d msg.func.id"},{"line_number":340,"context_line":"            except AttributeError:"},{"line_number":341,"context_line":"                return"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"            # the function name is the correct translation helper"},{"line_number":344,"context_line":"            # for the logging method"}],"source_content_type":"text/x-python","patch_set":7,"id":"da86d52c_b05555fb","line":341,"updated":"2015-02-12 21:55:04.000000000","message":"Add a comment why it\u0027s ok to return early here.\n\nAlso, there should be a test.","commit_id":"aca494a5c083f0a24a5a81d6a1cc4e3f4a0e4057"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"44ba97e153e21db56a59d7fa14c3132b40d3c390","unresolved":false,"context_lines":[{"line_number":338,"context_line":"            try:"},{"line_number":339,"context_line":"                func_name \u003d msg.func.id"},{"line_number":340,"context_line":"            except AttributeError:"},{"line_number":341,"context_line":"                return"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"            # the function name is the correct translation helper"},{"line_number":344,"context_line":"            # for the logging method"}],"source_content_type":"text/x-python","patch_set":7,"id":"da86d52c_a30dff3f","line":341,"in_reply_to":"da86d52c_b05555fb","updated":"2015-02-13 07:24:14.000000000","message":"done... i think","commit_id":"aca494a5c083f0a24a5a81d6a1cc4e3f4a0e4057"}]}
