Skip to content

Commit

Permalink
vlog.py: Remove redundant setLevel() if "/dev/log" doesn't exist.
Browse files Browse the repository at this point in the history
Also update a comment.

Signed-off-by: Daniele Di Proietto <[email protected]>
Acked-by: Gurucharan Shetty <[email protected]>
  • Loading branch information
ddiproietto committed Jul 6, 2016
1 parent b59cc14 commit cc51a96
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions python/ovs/vlog.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,11 +298,10 @@ def add_syslog_handler(facility=None):
return

logger = logging.getLogger('syslog')
# If there is no infrastructure to support python syslog, increase
# the logging severity level to avoid repeated errors.
# If there is no infrastructure to support python syslog, disable
# the logger to avoid repeated errors.
if not os.path.exists("/dev/log"):
logger.disabled = True
logger.setLevel(logging.CRITICAL)
return

if syslog_handler:
Expand Down

0 comments on commit cc51a96

Please sign in to comment.