[rrd-developers] rrdcached foreground logging
Tobias Oetiker
tobi at oetiker.ch
Sat Jul 10 09:28:45 CEST 2010
Hi Bernard,
Yesterday Bernard Li wrote:
> Hi all:
>
> The following patch adds a new line per log message when running
> rrdcached in foreground:
>
> Index: src/rrd_daemon.c
> ===================================================================
> --- src/rrd_daemon.c (revision 2114)
> +++ src/rrd_daemon.c (working copy)
> @@ -115,7 +115,7 @@
> #define RRDD_LOG(severity, ...) \
> do { \
> if (stay_foreground) \
> - fprintf(stderr, __VA_ARGS__); \
> + fprintf(stderr, "%s\n", __VA_ARGS__); \
> syslog ((severity), __VA_ARGS__); \
> } while (0)
would this not expand from
RRDD_LOG(LOG_NOTICE, "caught SIG%s", sig);
to
fprintf(stderr, "%s\n", "caught SIG%s", sig);
and this would print
"caught SIG%s\n"
or am I missing something clever here ?
cheers
tobi
> _______________________________________________
> rrd-developers mailing list
> rrd-developers at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-developers
>
>
--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch tobi at oetiker.ch ++41 62 775 9902 / sb: -9900
More information about the rrd-developers
mailing list