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 <[email protected]>
---
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 <[email protected]>
_______________________________________________
node-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/node-patches

Reply via email to