So I am assuming I need to somehome replace this `select(LOG);$|=1;' with system call to `logger' command?
Still looking for suggestion On Sat, Apr 12, 2008 at 4:54 PM, Asif Iqbal <[EMAIL PROTECTED]> wrote: > How do I modify this to send the debug/minidebug log to syslog instead > of to file? > > Right now they are going to qmail-queue.log file. > > I rather send them to syslog and config syslog to point to > qmail-queue.log or wherever. > > > if ($DEBUG || $MINIDEBUG ) { > open(LOG,">>$logdir/$debuglog"); > select(LOG);$|=1; > &debug("+++ starting debugging for process $$ (ppid=$nppid) by > uid=$real_uid"); > &minidebug("+++ starting debugging for process $$ (ppid=$nppid) by > uid=$real_uid"); > } > > sub debug { > my $dnowtime = strftime("%a, %d %b %Y %H:%M:%S %Z", localtime(time)); > print LOG "$dnowtime:$nprocess: ",@_,"\n" if ($DEBUG); > } > > sub minidebug { > my $dnowtime = strftime("%a, %d %b %Y %H:%M:%S %Z", localtime(time)); > print LOG "$dnowtime:$nprocess: ",@_,"\n" if ($MINIDEBUG && !$DEBUG); > } > > Thanks > > > > -- > Asif Iqbal > PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu > -- Asif Iqbal PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ Qmail-scanner-general mailing list Qmail-scanner-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qmail-scanner-general