Robert,
would you be so kind to flush log messages written to stdout and stderr?
The simple change below would allow Pound users to pipe Pound's messages
to logging applications like multilog
(http://cr.yp.to/daemontools/multilog.html).
I personally prefer to run Pound under daemontools control with Pound's
messages logged by multilog. Daemontools ensures that Pound is up and
running and multilog ensures that Pound's log files never fill up the
hard drive.
--- orig/svc.c
+++ mod/svc.c
(at)(at) -163,15 +163,17 (at)(at)
vsnprintf(buf, MAXBUF, fmt, ap);
va_end(ap);
#ifdef NO_SYSLOG
- if(priority == LOG_INFO)
+ if(priority == LOG_INFO) {
printf("%s\n", buf);
- else {
+ fflush(stdout);
+ } else {
char t_stamp[32];
time_t now;
now = time(NULL);
strftime(t_stamp, sizeof(t_stamp), "%d/%b/%Y %H:%M:%S %z",
localtime(&now));
fprintf(stderr, "%s: %s\n", t_stamp, buf);
+ fflush(stderr);
}
#else
syslog(priority, "%s", buf);
Thanks,
[...]
|