)]}'
{"doc/source/user/guidelines.rst":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"a382dfaa268fff7f65254ff3cc37dd765fe0baef","unresolved":false,"context_lines":[{"line_number":201,"context_line":""},{"line_number":202,"context_line":"  # RIGHT"},{"line_number":203,"context_line":"  raise ValueError(_(\u0027some message: v1\u003d%(v1)s v2\u003d%(v2)s\u0027) % {\u0027v1\u0027: v1, \u0027v2\u0027: v2})"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"Adding Variables to Log Messages"},{"line_number":207,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_26e7efae","side":"PARENT","line":204,"updated":"2019-06-11 19:20:35.000000000","message":"This section needs to stay. You can remove the _LI() wrappers from the examples.","commit_id":"07f136bcea32a9f62d71ced1907b07d9b6e7d967"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"6d941e679cb3f07a9b55ea3ea293750a074e4845","unresolved":false,"context_lines":[{"line_number":201,"context_line":""},{"line_number":202,"context_line":"  # RIGHT"},{"line_number":203,"context_line":"  raise ValueError(_(\u0027some message: v1\u003d%(v1)s v2\u003d%(v2)s\u0027) % {\u0027v1\u0027: v1, \u0027v2\u0027: v2})"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"Adding Variables to Log Messages"},{"line_number":207,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_425e8144","side":"PARENT","line":204,"in_reply_to":"9fb8cfa7_21da794a","updated":"2019-06-12 11:05:48.000000000","message":"OK, that makes sense to move it elsewhere.  The question is, *where*?\n\noslo.log docs is the obvious candidate (BTW to which I just submitted https://review.opendev.org/#/c/664855/ with the same topic / Change-Id as this, in order to fix similarly outdated docs there).\n\nHowever, the oslo.log docs do not contain much in the way of best practice guidelines; instead they choose to delegate that:\n\nhttps://docs.openstack.org/oslo.log/latest/user/usage.html#general-logging-guidelines\n\nwhich has a hyperlink to\n\nhttps://specs.openstack.org/openstack/openstack-specs/specs/log-guidelines.html\n\nAnd IIUC, we don\u0027t use openstack-specs any more.  So what to do?  Should we look to transfer the majority of that spec into oslo.log docs, and then add the variable interpolation hint there?  Presumably adding it to that old spec is not the right approach.","commit_id":"07f136bcea32a9f62d71ced1907b07d9b6e7d967"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"5f6e8a31055d0200d0c368861b1357d1d0c1ea88","unresolved":false,"context_lines":[{"line_number":201,"context_line":""},{"line_number":202,"context_line":"  # RIGHT"},{"line_number":203,"context_line":"  raise ValueError(_(\u0027some message: v1\u003d%(v1)s v2\u003d%(v2)s\u0027) % {\u0027v1\u0027: v1, \u0027v2\u0027: v2})"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"Adding Variables to Log Messages"},{"line_number":207,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_61007102","side":"PARENT","line":204,"in_reply_to":"9fb8cfa7_26e7efae","updated":"2019-06-11 19:29:45.000000000","message":"This section is only log-specific. The same information is presented above in the \"Adding Variables to Translated Messages\" section.\n\nSo I think it\u0027s safe to remove this.","commit_id":"07f136bcea32a9f62d71ced1907b07d9b6e7d967"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"ea8ab4f2d4378968aadb8616d90065bdcdd051d2","unresolved":false,"context_lines":[{"line_number":201,"context_line":""},{"line_number":202,"context_line":"  # RIGHT"},{"line_number":203,"context_line":"  raise ValueError(_(\u0027some message: v1\u003d%(v1)s v2\u003d%(v2)s\u0027) % {\u0027v1\u0027: v1, \u0027v2\u0027: v2})"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"Adding Variables to Log Messages"},{"line_number":207,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_5e8acc69","side":"PARENT","line":204,"in_reply_to":"9fb8cfa7_425e8144","updated":"2019-06-12 21:51:14.000000000","message":"oslo.log sounds fine to me. Weaving this content into the usage doc you\u0027ve linked would be appropriate. It need not be in/near the section about #general-logging-guidelines.","commit_id":"07f136bcea32a9f62d71ced1907b07d9b6e7d967"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"fc58ca64a8fb56a9d65fd57132b6a21c800f6d9c","unresolved":false,"context_lines":[{"line_number":201,"context_line":""},{"line_number":202,"context_line":"  # RIGHT"},{"line_number":203,"context_line":"  raise ValueError(_(\u0027some message: v1\u003d%(v1)s v2\u003d%(v2)s\u0027) % {\u0027v1\u0027: v1, \u0027v2\u0027: v2})"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"Adding Variables to Log Messages"},{"line_number":207,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_7a8b13c2","side":"PARENT","line":204,"in_reply_to":"9fb8cfa7_5e8acc69","updated":"2019-06-13 11:18:41.000000000","message":"I\u0027ve added it as a whole new section since it was too big to fit in an existing one.","commit_id":"07f136bcea32a9f62d71ced1907b07d9b6e7d967"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"68b81bed34bb663ec0157ad167cdce3302d50c48","unresolved":false,"context_lines":[{"line_number":201,"context_line":""},{"line_number":202,"context_line":"  # RIGHT"},{"line_number":203,"context_line":"  raise ValueError(_(\u0027some message: v1\u003d%(v1)s v2\u003d%(v2)s\u0027) % {\u0027v1\u0027: v1, \u0027v2\u0027: v2})"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"Adding Variables to Log Messages"},{"line_number":207,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_612f113f","side":"PARENT","line":204,"in_reply_to":"9fb8cfa7_61007102","updated":"2019-06-11 19:50:51.000000000","message":"Agreed - this section has some useful bits, but as far as translation goes I think things are covered. It might help having something outside of oslo.i18n (do we have oslo.logging docs) that talks about string interpolation.","commit_id":"07f136bcea32a9f62d71ced1907b07d9b6e7d967"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1a6bb7f2c096055e1ade2323f3f26566ce811c8b","unresolved":false,"context_lines":[{"line_number":201,"context_line":""},{"line_number":202,"context_line":"  # RIGHT"},{"line_number":203,"context_line":"  raise ValueError(_(\u0027some message: v1\u003d%(v1)s v2\u003d%(v2)s\u0027) % {\u0027v1\u0027: v1, \u0027v2\u0027: v2})"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"Adding Variables to Log Messages"},{"line_number":207,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_21da794a","side":"PARENT","line":204,"in_reply_to":"9fb8cfa7_612f113f","updated":"2019-06-11 19:53:48.000000000","message":"Oh, I see, you\u0027re saying this information doesn\u0027t belong here because this is a translation doc and it\u0027s not about translation.\n\nOkay, but yeah, it definitely needs to go somewhere. I point to this all the time when I -1 a change for it :P","commit_id":"07f136bcea32a9f62d71ced1907b07d9b6e7d967"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"a382dfaa268fff7f65254ff3cc37dd765fe0baef","unresolved":false,"context_lines":[{"line_number":222,"context_line":"message if the message is not going to be emitted because of the"},{"line_number":223,"context_line":"current log level."},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"Avoid Forcing the Translation of Translatable Variables"},{"line_number":226,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"Translation can also be delayed for variables that potentially contain"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_c68cd3d8","side":"PARENT","line":225,"updated":"2019-06-11 19:20:35.000000000","message":"This section should also stay, though the word \"translation\" should be replaced. str/unicode/six.text_type does conversion (\"translation\" in a non-i18n sense) that is unnecessary because the logger handles it for you when it does the interpolation.","commit_id":"07f136bcea32a9f62d71ced1907b07d9b6e7d967"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"68b81bed34bb663ec0157ad167cdce3302d50c48","unresolved":false,"context_lines":[{"line_number":222,"context_line":"message if the message is not going to be emitted because of the"},{"line_number":223,"context_line":"current log level."},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"Avoid Forcing the Translation of Translatable Variables"},{"line_number":226,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"Translation can also be delayed for variables that potentially contain"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_412a0d2c","side":"PARENT","line":225,"in_reply_to":"9fb8cfa7_0623cbbe","updated":"2019-06-11 19:50:51.000000000","message":"I\u0027m pretty sure at one point there was some consensus on that being deprecated and removed. I don\u0027t think we should include any information here that might cause someone to start looking at using it.","commit_id":"07f136bcea32a9f62d71ced1907b07d9b6e7d967"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"6d941e679cb3f07a9b55ea3ea293750a074e4845","unresolved":false,"context_lines":[{"line_number":222,"context_line":"message if the message is not going to be emitted because of the"},{"line_number":223,"context_line":"current log level."},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"Avoid Forcing the Translation of Translatable Variables"},{"line_number":226,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"Translation can also be delayed for variables that potentially contain"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_c22031af","side":"PARENT","line":225,"in_reply_to":"9fb8cfa7_412a0d2c","updated":"2019-06-12 11:05:48.000000000","message":"This section *can\u0027t* be left as is, because it contains misleading examples of log translation, and the whole point of this change is to remove those.  If you can suggest some reasonable way to edit it so that it preserves its main message *without* using examples containing translatable logs then please go ahead and I\u0027ll reinsert it.  Otherwise I think it has to be removed.","commit_id":"07f136bcea32a9f62d71ced1907b07d9b6e7d967"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"2c6852fdd3bb8b0650d354d5b0cba6c3d6be836e","unresolved":false,"context_lines":[{"line_number":222,"context_line":"message if the message is not going to be emitted because of the"},{"line_number":223,"context_line":"current log level."},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"Avoid Forcing the Translation of Translatable Variables"},{"line_number":226,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"Translation can also be delayed for variables that potentially contain"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_cb060053","side":"PARENT","line":225,"in_reply_to":"9fb8cfa7_c22031af","updated":"2019-06-12 21:33:21.000000000","message":"Oh, good point. Lazy translation is irrelevant if we\u0027re not translating at all. :-)","commit_id":"07f136bcea32a9f62d71ced1907b07d9b6e7d967"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"5f6e8a31055d0200d0c368861b1357d1d0c1ea88","unresolved":false,"context_lines":[{"line_number":222,"context_line":"message if the message is not going to be emitted because of the"},{"line_number":223,"context_line":"current log level."},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"Avoid Forcing the Translation of Translatable Variables"},{"line_number":226,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"Translation can also be delayed for variables that potentially contain"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_0623cbbe","side":"PARENT","line":225,"in_reply_to":"9fb8cfa7_c68cd3d8","updated":"2019-06-11 19:29:45.000000000","message":"This is for lazy translation, which was something we had discussed deprecating since no one uses or cares about it as far as anyone knows. I think mriedem had started a thread on the operators list at one point.\n\nIn any case, I\u0027d be okay with removing this in a separate change since it\u0027s project-specific (projects always had to opt-in to lazy translation and not all did) and not really relevant anymore.","commit_id":"07f136bcea32a9f62d71ced1907b07d9b6e7d967"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"cc67bdceecbb091b0c931cab13ddcceded535b90","unresolved":false,"context_lines":[{"line_number":64,"context_line":"   \u003chttp://lists.openstack.org/pipermail/openstack-dev/2017-March/114191.html\u003e`_"},{"line_number":65,"context_line":"   primarily based on `feedback from operators"},{"line_number":66,"context_line":"   \u003chttp://lists.openstack.org/pipermail/openstack-operators/2017-March/012953.html\u003e`_"},{"line_number":67,"context_line":"   that they were not only needed but also undesirable, because they"},{"line_number":68,"context_line":"   fragmented the set of web pages providing helpful information about"},{"line_number":69,"context_line":"   any particular log message, thereby reducing the chances of finding"},{"line_number":70,"context_line":"   those web pages by doing a web search for the message.  Refer to"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_a6c67f67","line":67,"range":{"start_line":67,"start_character":18,"end_line":67,"end_character":33},"updated":"2019-06-11 19:01:54.000000000","message":"\"that they were not needed\" or \"that they were not only unnecessary\"?","commit_id":"e3b8ae53a319f494beeb458a803e99342cdc0005"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1a6bb7f2c096055e1ade2323f3f26566ce811c8b","unresolved":false,"context_lines":[{"line_number":64,"context_line":"   \u003chttp://lists.openstack.org/pipermail/openstack-dev/2017-March/114191.html\u003e`_"},{"line_number":65,"context_line":"   primarily based on `feedback from operators"},{"line_number":66,"context_line":"   \u003chttp://lists.openstack.org/pipermail/openstack-operators/2017-March/012953.html\u003e`_"},{"line_number":67,"context_line":"   that they were not only needed but also undesirable, because they"},{"line_number":68,"context_line":"   fragmented the set of web pages providing helpful information about"},{"line_number":69,"context_line":"   any particular log message, thereby reducing the chances of finding"},{"line_number":70,"context_line":"   those web pages by doing a web search for the message.  Refer to"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_e1e78111","line":67,"range":{"start_line":67,"start_character":18,"end_line":67,"end_character":33},"in_reply_to":"9fb8cfa7_a6c67f67","updated":"2019-06-11 19:53:48.000000000","message":"I\u0027ll keep my -1 for this","commit_id":"e3b8ae53a319f494beeb458a803e99342cdc0005"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"6d941e679cb3f07a9b55ea3ea293750a074e4845","unresolved":false,"context_lines":[{"line_number":64,"context_line":"   \u003chttp://lists.openstack.org/pipermail/openstack-dev/2017-March/114191.html\u003e`_"},{"line_number":65,"context_line":"   primarily based on `feedback from operators"},{"line_number":66,"context_line":"   \u003chttp://lists.openstack.org/pipermail/openstack-operators/2017-March/012953.html\u003e`_"},{"line_number":67,"context_line":"   that they were not only needed but also undesirable, because they"},{"line_number":68,"context_line":"   fragmented the set of web pages providing helpful information about"},{"line_number":69,"context_line":"   any particular log message, thereby reducing the chances of finding"},{"line_number":70,"context_line":"   those web pages by doing a web search for the message.  Refer to"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_e568ec1d","line":67,"range":{"start_line":67,"start_character":18,"end_line":67,"end_character":33},"in_reply_to":"9fb8cfa7_e1e78111","updated":"2019-06-12 11:05:48.000000000","message":"I meant \"not only *not* needed\" - fixed.","commit_id":"e3b8ae53a319f494beeb458a803e99342cdc0005"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"cc67bdceecbb091b0c931cab13ddcceded535b90","unresolved":false,"context_lines":[{"line_number":152,"context_line":""},{"line_number":153,"context_line":"or this::"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"  # EVEN WRONGER"},{"line_number":156,"context_line":"  msg \u003d _LE(\u0027There was an error.\u0027)"},{"line_number":157,"context_line":"  LOG.exception(msg)"},{"line_number":158,"context_line":"  raise LocalExceptionClass(msg)"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_26a84f8a","line":155,"updated":"2019-06-11 19:01:54.000000000","message":"I like EVEN WRONGER, but maybe \"ALSO WRONG\" or \"EVEN MORE WRONG\"? :)","commit_id":"e3b8ae53a319f494beeb458a803e99342cdc0005"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"6d941e679cb3f07a9b55ea3ea293750a074e4845","unresolved":false,"context_lines":[{"line_number":152,"context_line":""},{"line_number":153,"context_line":"or this::"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"  # EVEN WRONGER"},{"line_number":156,"context_line":"  msg \u003d _LE(\u0027There was an error.\u0027)"},{"line_number":157,"context_line":"  LOG.exception(msg)"},{"line_number":158,"context_line":"  raise LocalExceptionClass(msg)"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_054d00c3","line":155,"in_reply_to":"9fb8cfa7_26a84f8a","updated":"2019-06-12 11:05:48.000000000","message":"Yeah \"wronger\" isn\u0027t a real word but I kinda liked the comedy value of it ;) Fixed.","commit_id":"e3b8ae53a319f494beeb458a803e99342cdc0005"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"21de5f902de8e2d0b6723e8555ed85dc2f2a1b82","unresolved":false,"context_lines":[{"line_number":160,"context_line":"Instead, use this style::"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"  # RIGHT"},{"line_number":163,"context_line":"  LOG.exception(\u0027There was an error.\u0027)"},{"line_number":164,"context_line":"  raise LocalExceptionClass(_(\u0027An error occurred.\u0027))"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"Adding Variables to Translated Messages"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_86c25b58","line":164,"range":{"start_line":163,"start_character":2,"end_line":164,"end_character":52},"updated":"2019-06-11 18:58:37.000000000","message":"This is kind of horrible, especially when the message is long.  Is there really no better way?","commit_id":"e3b8ae53a319f494beeb458a803e99342cdc0005"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"e748184c6ddcd404bd4fd834e537238615f8ba06","unresolved":false,"context_lines":[{"line_number":160,"context_line":"Instead, use this style::"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"  # RIGHT"},{"line_number":163,"context_line":"  LOG.exception(\u0027There was an error.\u0027)"},{"line_number":164,"context_line":"  raise LocalExceptionClass(_(\u0027An error occurred.\u0027))"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"Adding Variables to Translated Messages"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_c5328810","line":164,"range":{"start_line":163,"start_character":2,"end_line":164,"end_character":52},"in_reply_to":"9fb8cfa7_06d98bf1","updated":"2019-06-11 20:59:14.000000000","message":"Right, it\u0027s important to point out that _() is used via *source inspection* to find the messages, and so if the thing between the parens is not a string it doesn\u0027t do what you would expect.\n\nIt\u0027s also a bit odd to log an exception and then throw it. Why not wait and log it where the exception is caught so you have the full traceback?","commit_id":"e3b8ae53a319f494beeb458a803e99342cdc0005"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"81f5dd89846322ed0fbf0e96f58cd6252bdfdb4e","unresolved":false,"context_lines":[{"line_number":160,"context_line":"Instead, use this style::"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"  # RIGHT"},{"line_number":163,"context_line":"  LOG.exception(\u0027There was an error.\u0027)"},{"line_number":164,"context_line":"  raise LocalExceptionClass(_(\u0027An error occurred.\u0027))"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"Adding Variables to Translated Messages"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_e6a3179d","line":164,"range":{"start_line":163,"start_character":2,"end_line":164,"end_character":52},"in_reply_to":"9fb8cfa7_86c25b58","updated":"2019-06-11 19:03:59.000000000","message":"I agree. And at least in Cinder, I\u0027ve still been allowing (even suggesting) the old way that does result in a translated log message. I think in most cases it will be mostly harmless. But would be interesting to hear from others and if I should change my stance on it.","commit_id":"e3b8ae53a319f494beeb458a803e99342cdc0005"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"63f66d5f97d0d25a889e5ac7f1c7902792ef44b3","unresolved":false,"context_lines":[{"line_number":160,"context_line":"Instead, use this style::"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"  # RIGHT"},{"line_number":163,"context_line":"  LOG.exception(\u0027There was an error.\u0027)"},{"line_number":164,"context_line":"  raise LocalExceptionClass(_(\u0027An error occurred.\u0027))"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"Adding Variables to Translated Messages"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_7dcec4b4","line":164,"range":{"start_line":163,"start_character":2,"end_line":164,"end_character":52},"in_reply_to":"9fb8cfa7_a802c96d","updated":"2019-06-12 11:18:29.000000000","message":"Ah, good points - thanks.  I\u0027ve changed to LOG.error, and I\u0027ve submitted a follow-up to clarify regarding source inspection:\n\nhttps://review.opendev.org/#/c/664859/","commit_id":"e3b8ae53a319f494beeb458a803e99342cdc0005"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b4a1917ac6d75a74634c2135286f365afd2353f8","unresolved":false,"context_lines":[{"line_number":160,"context_line":"Instead, use this style::"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"  # RIGHT"},{"line_number":163,"context_line":"  LOG.exception(\u0027There was an error.\u0027)"},{"line_number":164,"context_line":"  raise LocalExceptionClass(_(\u0027An error occurred.\u0027))"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"Adding Variables to Translated Messages"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_a802c96d","line":164,"range":{"start_line":163,"start_character":2,"end_line":164,"end_character":52},"in_reply_to":"9fb8cfa7_c5328810","updated":"2019-06-11 21:25:27.000000000","message":"Yeah, the example might be better if it was LOG.error or lower instead. (Plenty of scenarios where the exception is caught and not logged by the caller.)","commit_id":"e3b8ae53a319f494beeb458a803e99342cdc0005"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"a382dfaa268fff7f65254ff3cc37dd765fe0baef","unresolved":false,"context_lines":[{"line_number":160,"context_line":"Instead, use this style::"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"  # RIGHT"},{"line_number":163,"context_line":"  LOG.exception(\u0027There was an error.\u0027)"},{"line_number":164,"context_line":"  raise LocalExceptionClass(_(\u0027An error occurred.\u0027))"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"Adding Variables to Translated Messages"}],"source_content_type":"text/x-rst","patch_set":1,"id":"9fb8cfa7_06d98bf1","line":164,"range":{"start_line":163,"start_character":2,"end_line":164,"end_character":52},"in_reply_to":"9fb8cfa7_e6a3179d","updated":"2019-06-11 19:20:35.000000000","message":"Alas, no better way. In particular, you definitely can\u0027t do this:\n\n msg \u003d \"...\"\n LOG.exception(msg)\n raise TheException(_(msg))","commit_id":"e3b8ae53a319f494beeb458a803e99342cdc0005"}]}
