From: Justin Pettit Date: Fri, 11 Sep 2009 17:52:40 +0000 (-0700) Subject: xenserver: Set default file log level and fix brcompatd file X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4016a58d29a52f0e57f2f19f982d6e3a95c77d2;p=openvswitch xenserver: Set default file log level and fix brcompatd file Set the default log level for file logging to INFO for ovs-vswitchd and ovs-brcompatd. This is done so that coverage messages are kept in the log file, since we no longer log them through syslog due its synchronous writing on Xen hosts. The issue is described in detail in commit 6bc995e. Fix test for whether file logging should be enabled for ovs-brcompatd. Reported by Ian Campbell. --- diff --git a/xenserver/etc_init.d_vswitch b/xenserver/etc_init.d_vswitch index 6ca0a1de..740f35c6 100755 --- a/xenserver/etc_init.d_vswitch +++ b/xenserver/etc_init.d_vswitch @@ -35,7 +35,7 @@ VSWITCHD_PIDFILE="${VSWITCHD_PIDFILE:-/var/run/ovs-vswitchd.pid}" VSWITCHD_RUN_DIR="${VSWITCHD_RUN_DIR:-/var/xen/vswitch}" VSWITCHD_PRIORITY="${VSWITCHD_PRIORITY:--10}" VSWITCHD_LOGFILE="${VSWITCHD_LOGFILE:-/var/log/ovs-vswitchd.log}" -VSWITCHD_FILE_LOGLEVEL="${VSWITCHD_FILE_LOGLEVEL:-}" +VSWITCHD_FILE_LOGLEVEL="${VSWITCHD_FILE_LOGLEVEL:-INFO}" VSWITCHD_SYSLOG_LOGLEVEL="${VSWITCHD_SYSLOG_LOGLEVEL:-ERR}" VSWITCHD_MEMLEAK_LOGFILE="${VSWITCHD_MEMLEAK_LOGFILE:-}" VSWITCHD_STRACE_LOG="${VSWITCHD_STRACE_LOG:-}" @@ -48,7 +48,7 @@ BRCOMPATD_PIDFILE="${BRCOMPATD_PIDFILE:-/var/run/ovs-brcompatd.pid}" BRCOMPATD_RUN_DIR="${BRCOMPATD_RUN_DIR:-/var/xen/vswitch}" BRCOMPATD_PRIORITY="${BRCOMPATD_PRIORITY:--10}" BRCOMPATD_LOGFILE="${BRCOMPATD_LOGFILE:-/var/log/ovs-brcompatd.log}" -BRCOMPATD_FILE_LOGLEVEL="${BRCOMPATD_FILE_LOGLEVEL:-}" +BRCOMPATD_FILE_LOGLEVEL="${BRCOMPATD_FILE_LOGLEVEL:-INFO}" BRCOMPATD_SYSLOG_LOGLEVEL="${BRCOMPATD_SYSLOG_LOGLEVEL:-ERR}" BRCOMPATD_MEMLEAK_LOGFILE="${BRCOMPATD_MEMLEAK_LOGFILE:-}" BRCOMPATD_STRACE_LOG="${BRCOMPATD_STRACE_LOG:-}" @@ -169,7 +169,7 @@ function start_brcompatd { mkdir -p "$BRCOMPATD_RUN_DIR" fi cd "$BRCOMPATD_RUN_DIR" - if [ ! -n "$BRCOMPATD_FILE_LOGLEVEL" ]; then + if [ -n "$BRCOMPATD_FILE_LOGLEVEL" ]; then logfile_level_opt="-vANY:FILE:${BRCOMPATD_FILE_LOGLEVEL}" logfile_file_opt="--log-file=$BRCOMPATD_LOGFILE" fi