Skip to content

Commit

Permalink
vlog test: Disable default syslog logger
Browse files Browse the repository at this point in the history
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@cloudbasesolutions.com>
Acked-by: Daniele Di Proietto <diproiettod@vmware.com>
  • Loading branch information
Paul Boca authored and ddiproietto committed Jul 6, 2016
1 parent a5bdd3b commit 902f916
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions python/ovs/vlog.py
Expand Up @@ -301,6 +301,7 @@ def add_syslog_handler(facility=None):
# 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

Expand Down

0 comments on commit 902f916

Please sign in to comment.