2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 14:25:26 +00:00

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.
This commit is contained in:
Justin Pettit
2009-09-11 10:52:40 -07:00
parent 6bc995e46d
commit d4016a58d2

View File

@@ -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