From: Kevin Benton Date: Tue, 29 Sep 2015 15:42:25 +0000 (-0700) Subject: Add a logging guideline to 'effective neutron' X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=7e05c8b728f5cd5f51dd2970343e6ea7e8b21050;p=openstack-build%2Fneutron-build.git Add a logging guideline to 'effective neutron' LOG statements should only receive unicode. Change-Id: I6a6d9fdbcc3ed9c7eee4889bfa6f328f1bd6d729 --- diff --git a/doc/source/devref/effective_neutron.rst b/doc/source/devref/effective_neutron.rst index 98bf8e9fb..cae770bb2 100644 --- a/doc/source/devref/effective_neutron.rst +++ b/doc/source/devref/effective_neutron.rst @@ -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 `_ - to avoid littering the logs with traces logged at inappropriate levels. +* Make yourself familiar with `OpenStack logging guidelines `_ + 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 ~~~~~~~~~~~~~~~~~~