procmail
[Top] [All Lists]

Re: Creating a condensed log output

2001-07-25 23:35:20
In your message regarding Re: Creating a condensed log output dated Wed, 25
Jul 2001 19:01:46 -0400 (EDT), Don Hammond said that ...

Thank you Don, just what I needed to know. 

 On 25 Jul, Tim Rice wrote:
 | Hi all,
 | 
 | Not sure if this is possible but I wanted to ask your advice.

 I manage multiple log files and change verbosity according to need. Log
 files and verbosity are managed globally, by rcfile, and by recipe.
 At any point in time I'll usually have a procmaillog, procmaillog.dbg,
 procmaillog.tmp, procmaillog.spam and others all being used at the same
 time. I've been known to use procmaillog.tmp.tmp, procmaillog.dbg.tmp,
 or even zlog too. :-)  I frequently use a separate log file for
 debugging a single rcfile or an individual recipe.
 
 So, for example, if a particular rcfile of your's only delivers to
 SPAMFOLDER, at the top you could do something like:
 
 LOGFILEIN=$LOGFILE
 LOGFILE=$SPAMFOLDER/spamlog  # if SPAMFOLDER is a directory, or
 LOGFILE=$SPAMFOLDER.log      # if it's a file, or
 LOGFILE=${SPAMFOLDER}log     # ditto
 
 and at the end something like:
 
 LOGFILE=$LOGFILEIN
 
 That way, if procmail drops off the bottom without a delivery, whatever
 log file was in use when you enter that rcfile is restored before
 the next rcfile is processed. But if a message is delivered to
 $SPAMFOLDER it'll be logged accordingly. If the recipes aren't
 segregated that way, then you'd have to do this recipe by recipe. You
 can also manage verbosity in the same way if that's necessary. Then you
 can just retrieve the the specific loges you're interested in each day.
 
 Of course, you could use the same concept to just turn off logging
 altogether for those recipes that you "don't need to see". But I
 wouldn't recommend that, personally. If they're working seemingly
 correctly you can turn VERBOSE=off and LOGABSTRACT=no and quiet the
 logs. But at least you'll still see error messages.

Great advice, I do want to have the logs, just not see them all the time.

Love this list!
-- 
Best Regards,

Tim Rice
--------------
Phuket Thailand
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail