-----Original Message----- From: David Champion [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 02, 2004 7:43 PM To: Chuck Yerkes Cc: Subscribers of Qpopper Subject: Re: log to stdout instead of syslog
* On 2004.06.02, in <[EMAIL PROTECTED]>, * "Chuck Yerkes" <[EMAIL PROTECTED]> wrote: > Quoting Krayzman, Dmitriy ([EMAIL PROTECTED]): > > Hi, > > Can someone suggest a way to force popper to log to stdout or stderr > > instead of syslog. I'm trying to run qpopper under djb's tcpserver. > > Sure, you could rewrite the openlog and syslog functions and link > against YOUR version. Or tell syslog to write to your screen. Altogether, as long as you're recompiling, it's probably easier just to modify pop_log.c, changing line 145 from this: syslog ( (int) loglev, "%s", msgbuf ); to this: fputs(msgbuf, stderr); > I'm not sure what tcpserver has to do with error logging... I know that djb has a program (whose name I forgot) that reads log data from stdin and writes it to a file, automatically switching to a new (datestamped) file at certain time points or file sizes. It's cheap log rotation for people who want to avoid cron-activated log rotation scripts, and are more interested in moving the mountain to djb than in moving djb to the mountain. I think it's part of djb's daemontools package, like tcpserver, and I assume that's the reason for the interest. If not, then my answer is that doing all this doesn't offer you anything that syslog doesn't, and using syslog won't break tcpserver, if that burns your fire hotter than inetd or listen() does. -- -D. [EMAIL PROTECTED] NSIT::ENSS No money, no book. No book, no study. No study, no pass. No pass, no graduate. No graduate, no job. No job, no money. T h e U n i v e r s i t y o f C h i c a g o This is exactly what I was looking for. Thanks, works great. The name of the program is multilog and it's part of the daemontools. I do agree about moving the mountain. Thanks again, D.