2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-19 14:37:21 +00:00

tests: Don't log to syslog during tests.

Until now, "make check" generated a huge amount of output to syslog.  This
commit suppresses it.

Acked-by: Ilya Maximets <i.maximets@samsung.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
Ben Pfaff
2018-08-08 16:04:56 -07:00
parent 8aa88fadc4
commit e11f0c258d
9 changed files with 121 additions and 7 deletions

View File

@@ -305,9 +305,11 @@ class Vlog(object):
return
logger = logging.getLogger('syslog')
# If there is no infrastructure to support python syslog, disable
# the logger to avoid repeated errors.
if not os.path.exists("/dev/log"):
# Disable the logger if there is no infrastructure to support python
# syslog (to avoid repeated errors) or if the "null" syslog method
# requested by environment.
if (not os.path.exists("/dev/log")
or os.environ.get('OVS_SYSLOG_METHOD') == "null"):
logger.disabled = True
return