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>
This commit is contained in:
Paul Durrant 2016-08-04 14:44:14 +01:00 committed by Stefan Hajnoczi
parent e87d397e5e
commit 0a85241756
4 changed files with 83 additions and 0 deletions

View file

@ -192,6 +192,18 @@ After running qemu by root user, you can get the trace:
Restriction: "ftrace" backend is restricted to Linux only.
=== Syslog ===
The "syslog" backend sends trace events using the POSIX syslog API. The log
is opened specifying the LOG_DAEMON facility and LOG_PID option (so events
are tagged with the pid of the particular QEMU process that generated
them). All events are logged at LOG_INFO level.
NOTE: syslog may squash duplicate consecutive trace events and apply rate
limiting.
Restriction: "syslog" backend is restricted to POSIX compliant OS.
==== Monitor commands ====
* trace-file on|off|flush|set <path>