]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Add a logging guideline to 'effective neutron'
authorKevin Benton <blak111@gmail.com>
Tue, 29 Sep 2015 15:42:25 +0000 (08:42 -0700)
committerKevin Benton <blak111@gmail.com>
Tue, 6 Oct 2015 05:18:36 +0000 (22:18 -0700)
LOG statements should only receive unicode.

Change-Id: I6a6d9fdbcc3ed9c7eee4889bfa6f328f1bd6d729

doc/source/devref/effective_neutron.rst

index 98bf8e9fb68138d33016623cf294f793c54d2a61..cae770bb2f871de6c7041e6e6ce41a704a97de9c 100644 (file)
@@ -116,8 +116,12 @@ Translation and logging
 
 Document common pitfalls as well as good practices done when instrumenting your code.
 
- * Make yourself familiar with `OpenStack logging guidelines <http://specs.openstack.org/openstack/openstack-specs/specs/log-guidelines.html#definition-of-log-levels>`_
-   to avoid littering the logs with traces logged at inappropriate levels.
+* Make yourself familiar with `OpenStack logging guidelines <http://specs.openstack.org/openstack/openstack-specs/specs/log-guidelines.html#definition-of-log-levels>`_
+  to avoid littering the logs with traces logged at inappropriate levels.
+* The logger should only be passed unicode values. For example, do not pass it
+  exceptions or other objects directly (LOG.error(exc), LOG.error(port), etc.).
+  See http://docs.openstack.org/developer/oslo.log/usage.html#no-more-implicit-conversion-to-unicode-str
+  for more details.
 
 Project interfaces
 ~~~~~~~~~~~~~~~~~~