mirror of
https://github.com/openvswitch/ovs
synced 2025-08-30 05:47:55 +00:00
vlog.py: Remove redundant setLevel() if "/dev/log" doesn't exist.
Also update a comment. Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com> Acked-by: Gurucharan Shetty <guru@ovn.org>
This commit is contained in:
parent
b59cc14e03
commit
cc51a9677e
@ -298,11 +298,10 @@ class Vlog(object):
|
|||||||
return
|
return
|
||||||
|
|
||||||
logger = logging.getLogger('syslog')
|
logger = logging.getLogger('syslog')
|
||||||
# If there is no infrastructure to support python syslog, increase
|
# If there is no infrastructure to support python syslog, disable
|
||||||
# the logging severity level to avoid repeated errors.
|
# the logger to avoid repeated errors.
|
||||||
if not os.path.exists("/dev/log"):
|
if not os.path.exists("/dev/log"):
|
||||||
logger.disabled = True
|
logger.disabled = True
|
||||||
logger.setLevel(logging.CRITICAL)
|
|
||||||
return
|
return
|
||||||
|
|
||||||
if syslog_handler:
|
if syslog_handler:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user