aboutsummaryrefslogtreecommitdiff
path: root/trace/control.c
diff options
context:
space:
mode:
Diffstat (limited to 'trace/control.c')
-rw-r--r--trace/control.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/trace/control.c b/trace/control.c
index d173c09f44..b179cde9df 100644
--- a/trace/control.c
+++ b/trace/control.c
@@ -19,6 +19,9 @@
#ifdef CONFIG_TRACE_LOG
#include "qemu/log.h"
#endif
+#ifdef CONFIG_TRACE_SYSLOG
+#include <syslog.h>
+#endif
#include "qapi/error.h"
#include "qemu/error-report.h"
#include "qemu/config-file.h"
@@ -250,6 +253,10 @@ bool trace_init_backends(void)
}
#endif
+#ifdef CONFIG_TRACE_SYSLOG
+ openlog(NULL, LOG_PID, LOG_DAEMON);
+#endif
+
return true;
}