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>
This commit is contained in:
Paolo Bonzini 2016-01-07 16:55:30 +03:00 committed by Stefan Hajnoczi
parent d890d50d18
commit ed7f5f1d8d
7 changed files with 24 additions and 7 deletions

View file

@ -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=...: "