[node-patches] Change in ovirt-node[master]: logging: Don't overwrite existing configurations

fabiand at fedoraproject.org fabiand at fedoraproject.org
Wed Sep 25 13:27:00 UTC 2013


Fabian Deutsch has uploaded a new change for review.

Change subject: logging: Don't overwrite existing configurations
......................................................................

logging: Don't overwrite existing configurations

Previously the logging configuration got overwritten when the log module
got loaded. This is now fixed by only configuring the log module when
there are no handlers.

Change-Id: I5c1e166db0f5ea7237df323df249ed68364d6c15
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M src/ovirt/node/log.py
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/79/19579/1

diff --git a/src/ovirt/node/log.py b/src/ovirt/node/log.py
index 855c9c8..51aef16 100644
--- a/src/ovirt/node/log.py
+++ b/src/ovirt/node/log.py
@@ -73,7 +73,8 @@
 
 def getLogger(name=None):
     if not getLogger._logger:
-        configure_logging()
+        if not logging.getLogger().handlers:
+            configure_logging()
         getLogger._logger = logging.getLogger()
     return getLogger._logger.getChild(name)
 getLogger._logger = None


-- 
To view, visit http://gerrit.ovirt.org/19579
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5c1e166db0f5ea7237df323df249ed68364d6c15
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at fedoraproject.org>



More information about the node-patches mailing list