From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Arturo Borrero Gonzalez <arturo@debian.org>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [conntrack-tools PATCH] log: print messages to stdout/sderr if running in console mode
Date: Thu, 27 Oct 2016 21:53:21 +0200 [thread overview]
Message-ID: <20161027195321.GA4996@salvia> (raw)
In-Reply-To: <147756970023.18643.10864550353652488496.stgit@nfdev2.cica.es>
On Thu, Oct 27, 2016 at 02:01:40PM +0200, Arturo Borrero Gonzalez wrote:
> If conntrackd is running in console mode (i.e. in foreground)
> then we can print the log messages to stdout/stderr.
>
> This eases the workflow for admins, since we condensate more info into
> the same terminal output.
>
> Example:
>
> % sudo conntrackd -C /etc/conntrackd.conf
> WARNING: XXXX is an invalid interface
> [Thu Oct 27 13:57:09 2016] (pid=7581) [notice] disabling internal cache
> [Thu Oct 27 13:57:09 2016] (pid=7581) [notice] disabling external cache
> [Thu Oct 27 13:57:09 2016] (pid=7581) [ERROR] can't open channel socket: No such device
> [Thu Oct 27 13:57:09 2016] (pid=7581) [ERROR] initialization failed
> ERROR: conntrackd cannot start, please check the logfile for more info
I'm fine with this. But I'm hitting compilation warnings here:
log.c: In function `logline_put':
log.c:93:23: warning: passing argument 3 of `vfprintf' from incompatible pointer type
vfprintf(fd, format, args);
^
In file included from ../include/log.h:4:0,
from log.c:21:
/usr/include/stdio.h:371:12: note: expected `struct __va_list_tag *'
but argument is of type `struct __va_list_tag (*)[1]'
extern int vfprintf (FILE *__restrict __s, const char *__restrict __format,
^
log.c: In function `dlog':
log.c:117:46: warning: passing argument 4 of `logline_put' from incompatible pointer type
logline_put(console_out, priority, format, args);
^
log.c:63:13: note: expected `struct __va_list_tag (*)[1]' but argument is of type `struct __va_list_tag *'
static void logline_put(FILE *fd, int priority, const char *format,
^
log.c:123:37: warning: passing argument 4 of `logline_put' from incompatible pointer type
logline_put(fd, priority, format, args);
^
log.c:63:13: note: expected `struct __va_list_tag (*)[1]' but argument is of type `struct __va_list_tag *'
static void logline_put(FILE *fd, int priority, const char *format,
$ gcc -v
[...]
gcc version 4.9.2 (Debian 4.9.2-10)
prev parent reply other threads:[~2016-10-27 19:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-27 12:01 [conntrack-tools PATCH] log: print messages to stdout/sderr if running in console mode Arturo Borrero Gonzalez
2016-10-27 19:53 ` Pablo Neira Ayuso [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=20161027195321.GA4996@salvia \
--to=pablo@netfilter.org \
--cc=arturo@debian.org \
--cc=netfilter-devel@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