public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: Karel Zak <kzak@redhat.com>
To: Sami Kerola <kerolasa@iki.fi>
Cc: util-linux@vger.kernel.org
Subject: Re: [PATCH] logger: allow user to send structured journald messages
Date: Tue, 4 Mar 2014 13:50:58 +0100	[thread overview]
Message-ID: <20140304125058.GJ32036@x2.net.home> (raw)
In-Reply-To: <1393010730-25126-1-git-send-email-kerolasa@iki.fi>

On Fri, Feb 21, 2014 at 07:25:30PM +0000, Sami Kerola wrote:
>  bash-completion/logger   |  4 +--
>  configure.ac             | 16 ++++++++++++
>  misc-utils/Makemodule.am |  4 +++
>  misc-utils/logger.1      | 29 ++++++++++++++++++++-
>  misc-utils/logger.c      | 66 +++++++++++++++++++++++++++++++++++++++++++++++-
>  5 files changed, 115 insertions(+), 4 deletions(-)

 Fixed & applied, thanks.

> +AC_ARG_ENABLE([journald],
> +  AS_HELP_STRING([--enable-journald], [add journald support to logger]),
> +  [], [enable_journald=no]
> +)
> +have_journald=no
> +AS_IF([test "x$enable_journald" = xyes], [
> +  PKG_CHECK_MODULES([SYSTEMD_JOURNAL], [libsystemd-journal], [], [
> +    AC_MSG_ERROR([cannot find libsystemd-journal support])
> +  ])
> +  have_journald=yes
> +  AC_DEFINE([HAVE_JOURNALD], [1], [Define if journald is available])
> +])
> +AM_CONDITIONAL([HAVE_JOURNALD], [test "x$have_journald" = xyes])

 Hmm, the latest systemd release merged all the libs to the one
 libsystemd, so it will be necessary to improve our configure.ac
 
 ... probably just add --enable-systemd and have_systemd= and 
 add fallbacks old versions with libsystemd-{journal,daemon} and
 remove --enable-journald etc.

> +	iovec = malloc(vectors * sizeof(struct iovec));

 xalloc.h :-)

> +	if (jfd) {
> +		int ret = journald_entry(jfd);
> +		if (stdin != jfd)
> +			fclose(jfd);
> +		if (ret == 0)
> +			return EXIT_SUCCESS;
> +		return EXIT_FAILURE;
> +	}

 #ifdef HAVE_JOURNALD ^^^

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

      reply	other threads:[~2014-03-04 12:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-21 19:25 [PATCH] logger: allow user to send structured journald messages Sami Kerola
2014-03-04 12:50 ` Karel Zak [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140304125058.GJ32036@x2.net.home \
    --to=kzak@redhat.com \
    --cc=kerolasa@iki.fi \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox