Re: [libvirt] [PATCH 7/9] Add systemd journal support

2012-09-28 Thread Daniel P. Berrange
On Thu, Sep 27, 2012 at 02:51:35PM -0600, Eric Blake wrote: On 09/27/2012 10:44 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Add support for logging to the systemd journal, using its simple client library. The benefit over syslog is that it accepts

Re: [libvirt] [PATCH 7/9] Add systemd journal support

2012-09-28 Thread Daniel P. Berrange
On Thu, Sep 27, 2012 at 02:51:35PM -0600, Eric Blake wrote: On 09/27/2012 10:44 AM, Daniel P. Berrange wrote: +/* Message was too large, so dump to temporary file + * and pass an FD to the journal + */ + +if ((buffd = mkostemp(path, O_CLOEXEC|O_RDWR)) 0) Is mkostemp

Re: [libvirt] [PATCH 7/9] Add systemd journal support

2012-09-28 Thread Eric Blake
On 09/28/2012 02:08 AM, Daniel P. Berrange wrote: +static int virLogAddOutputToJournald(int priority) +{ +if ((journalfd = socket(AF_UNIX, SOCK_DGRAM, 0)) 0) +return -1; +if (virSetInherit(journalfd, false) 0) { Why not use SOCK_DGRAM | SOCK_CLOEXEC in the socket() call?

Re: [libvirt] [PATCH 7/9] Add systemd journal support

2012-09-28 Thread Eric Blake
On 09/28/2012 04:09 AM, Daniel P. Berrange wrote: On Thu, Sep 27, 2012 at 02:51:35PM -0600, Eric Blake wrote: On 09/27/2012 10:44 AM, Daniel P. Berrange wrote: +/* Message was too large, so dump to temporary file + * and pass an FD to the journal + */ + +if ((buffd =

[libvirt] [PATCH 7/9] Add systemd journal support

2012-09-27 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com Add support for logging to the systemd journal, using its simple client library. The benefit over syslog is that it accepts structured log data, so the journald can store individual items like code file/line/func separately from the string message.

Re: [libvirt] [PATCH 7/9] Add systemd journal support

2012-09-27 Thread Eric Blake
On 09/27/2012 10:44 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com Add support for logging to the systemd journal, using its simple client library. The benefit over syslog is that it accepts structured log data, so the journald can store individual items like