From 7e05c8b728f5cd5f51dd2970343e6ea7e8b21050 Mon Sep 17 00:00:00 2001 From: Kevin Benton Date: Tue, 29 Sep 2015 08:42:25 -0700 Subject: [PATCH] Add a logging guideline to 'effective neutron' LOG statements should only receive unicode. Change-Id: I6a6d9fdbcc3ed9c7eee4889bfa6f328f1bd6d729 --- doc/source/devref/effective_neutron.rst | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 ~~~~~~~~~~~~~~~~~~ -- 2.45.2