[ovs-dev] [PATCH V6 17/17] vlog test: Disable default syslog logger

Paul Boca pboca at cloudbasesolutions.com
Wed Jul 6 12:38:32 UTC 2016


Disable the syslog logger in case on Windows, '/dev/log' doesn't exist.
Seems like on Python34 a default handler is added to the logger and it prints
even if no handler is set by us.

Signed-off-by: Paul-Daniel Boca <pboca at cloudbasesolutions.com>
---
V3: Initial commit
V4: No changes
V5: No changes
V6: No changes
---
 python/ovs/vlog.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/python/ovs/vlog.py b/python/ovs/vlog.py
index 4996387..49210b8 100644
--- a/python/ovs/vlog.py
+++ b/python/ovs/vlog.py
@@ -301,6 +301,7 @@ class Vlog(object):
         # If there is no infrastructure to support python syslog, increase
         # the logging severity level to avoid repeated errors.
         if not os.path.exists("/dev/log"):
+            logger.disabled = True
             logger.setLevel(logging.CRITICAL)
             return
 
-- 
2.7.2.windows.1



More information about the dev mailing list