aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorPaul Durrant <paul.durrant@citrix.com>2016-08-04 14:44:14 +0100
committerStefan Hajnoczi <stefanha@redhat.com>2016-09-05 13:47:01 -0400
commit0a852417564bc59441dc09509beacf7b49bc1e57 (patch)
treea27b04adbdaa3681d8797dab9097df2aca9464fd /configure
parente87d397e5ef66276ccc49b829527d605ca07d0ad (diff)
trace: add syslog tracing backend
This patch adds a tracing backend which sends output using syslog(). The syslog backend is limited to POSIX compliant systems. openlog() is called with facility set to LOG_DAEMON, with the LOG_PID option. Trace events are logged at level LOG_INFO. Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Message-id: 1470318254-29989-1-git-send-email-paul.durrant@citrix.com Cc: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure19
1 files changed, 19 insertions, 0 deletions
diff --git a/configure b/configure
index 4b808f9d17..5a9bda18b5 100755
--- a/configure
+++ b/configure
@@ -4192,6 +4192,18 @@ if compile_prog "" "" ; then
fi
##########################################
+# check if we have posix_syslog
+
+posix_syslog=no
+cat > $TMPC << EOF
+#include <syslog.h>
+int main(void) { openlog("qemu", LOG_PID, LOG_DAEMON); syslog(LOG_INFO, "configure"); return 0; }
+EOF
+if compile_prog "" "" ; then
+ posix_syslog=yes
+fi
+
+##########################################
# check if trace backend exists
$python "$source_path/scripts/tracetool.py" "--backends=$trace_backends" --check-backends > /dev/null 2> /dev/null
@@ -5468,6 +5480,13 @@ if have_backend "ftrace"; then
feature_not_found "ftrace(trace backend)" "ftrace requires Linux"
fi
fi
+if have_backend "syslog"; then
+ if test "$posix_syslog" = "yes" ; then
+ echo "CONFIG_TRACE_SYSLOG=y" >> $config_host_mak
+ else
+ feature_not_found "syslog(trace backend)" "syslog not available"
+ fi
+fi
echo "CONFIG_TRACE_FILE=$trace_file" >> $config_host_mak
if test "$rdma" = "yes" ; then