On Tue, Apr 15, 2008 at 4:27 AM, Salvatore Toribio <[EMAIL PROTECTED]> wrote:
> At 11:20 -0400 14-04-2008, Asif Iqbal wrote:
>
> > So I am assuming I need to somehome replace this `select(LOG);$|=1;'
> > with system call to `logger' command?
> >
> > Still looking for suggestion
> >
>
>  I don't know why are you trying this to write again in the same file...

I don't

I actually wanted to not write to a file and just use syslog

I see in your `sub-log_msg.pl' if I just define log_details to syslog
that should skip the writing to file.

What confuses me then is I see here it is already defined in my ST
patched qmail-scanner.pl `my $log_details="syslog";'
and I also see the  log_msg sub routine in there.

So why is it still writing the minidebug to a file? tail -f
qmail-queue.log shows it is writing to that file

What am I missing then?

>
>  Have a look at the file 'sub-log_msg.pl' in the distribution directory to
> figure out what you have to do...
>
>  Regards
>
>  ST
>
>
>
>
> >
> > 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);
> > >
> >  >  }
> >
> > >
> > >
> >
>



-- 
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

Reply via email to