[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] trace: add syslog tracing backend
From: |
Paul Durrant |
Subject: |
Re: [Qemu-devel] [PATCH] trace: add syslog tracing backend |
Date: |
Thu, 4 Aug 2016 12:14:10 +0000 |
> -----Original Message-----
> From: Stefan Hajnoczi [mailto:address@hidden
> Sent: 04 August 2016 13:04
> To: Paul Durrant
> Cc: address@hidden
> Subject: Re: [PATCH] trace: add syslog tracing backend
>
> On Tue, Aug 02, 2016 at 04:06:42PM +0100, Paul Durrant wrote:
> > 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 <address@hidden>
> > Cc: Stefan Hajnoczi <address@hidden>
> > ---
> > configure | 19 ++++++++++++++++
> > scripts/tracetool/backend/syslog.py | 45
> +++++++++++++++++++++++++++++++++++++
> > trace/control.c | 7 ++++++
> > 3 files changed, 71 insertions(+)
> > create mode 100644 scripts/tracetool/backend/syslog.py
>
> Please add a section to docs/tracing.txt. It's worth mentioning the
> caveats that Daniel Berrange pointed out in the documentation.
Sure. Will do.
>
> (I do believe that syslog tracing can be useful in some cases and it
> will be merged.)
>
> > +def generate_h_begin(events):
> > + out('#include "trace/control.h"',
> > + '#include <syslog.h>',
>
> Please include system headers before user headers. This makes it clear
> the user headers are not defining macros that will affect system
> headers (which is sometimes necessary but should be done explicitly).
Ok.
Cheers,
Paul