summaryrefslogtreecommitdiff
path: root/trace
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2016-01-07 16:55:30 +0300
committerStefan Hajnoczi <stefanha@redhat.com>2016-02-03 10:37:10 +0000
commited7f5f1d8db06fc31352a5ef4f54985e630c575a (patch)
tree648de861c856da524750b89e85f4aa2d5b6e700f /trace
parentd890d50d1821a18366a0b9f72e6c93689a47bcd4 (diff)
downloadqemu-ed7f5f1d8db06fc31352a5ef4f54985e630c575a.tar.gz
trace: convert stderr backend to log
[Also update .travis.yml --enable-trace-backends=stderr --Stefan] Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Denis V. Lunev <den@openvz.org> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Message-id: 1452174932-28657-10-git-send-email-den@openvz.org Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'trace')
-rw-r--r--trace/control.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/trace/control.c b/trace/control.c
index bef7884ee1..84ea840892 100644
--- a/trace/control.c
+++ b/trace/control.c
@@ -14,6 +14,9 @@
#ifdef CONFIG_TRACE_FTRACE
#include "trace/ftrace.h"
#endif
+#ifdef CONFIG_TRACE_LOG
+#include "qemu/log.h"
+#endif
#include "qemu/error-report.h"
int trace_events_enabled_count;
@@ -174,6 +177,13 @@ void trace_init_file(const char *file)
{
#ifdef CONFIG_TRACE_SIMPLE
st_set_trace_file(file);
+#elif defined CONFIG_TRACE_LOG
+ /* If both the simple and the log backends are enabled, "-trace file"
+ * only applies to the simple backend; use "-D" for the log backend.
+ */
+ if (file) {
+ qemu_set_log_filename(file);
+ }
#else
if (file) {
fprintf(stderr, "error: -trace file=...: "