procmail
[Top] [All Lists]

How to put stuff into log file?

2002-07-02 11:31:18
I'm trying to track down some bugs in my procmail recipies.

Setting VERBOSE=All gives me way too much.

Setting LOGABSTRACT=all gives me pretty close to what I want,
but doesn't say *why* it put the message into the specified folder.
If I used a different folder for every rule, that would be okay,
but it works out that I have a lot of rules that put things into
"might_be_junk" and many more that put things into "probable_junk"
and some that put things into "assuredly_junk"
and then some more that just delete things altogether.

So I want to put in little "debugging statements" at approporiate points
either displaying a variable or a simple string showing where I am, e.g.:
    '$SOMEVAR='${SOMEVAR}
or
    Calling the rule for messages from eejit at swampmail.com

I tried setting the LOG variable to a string,
but it got appended to the log file without a trailing newline
no matter what I did, e.g.

    '$VAR1='${VAR1}'$VAR2='${VAR2}Calling Rule ACalling Rule BCalling Rule C

I've tried to put in little "debugging statements" at approporiate points,
something like this:

:0 c
|\
printf '$SOMEVAR='"     '${SOMEVAR}'\n" >&2

This does seem to put useful information into the 'log' file.
However, it also (often but not always) puts the following into the 'log'
file:

procmail: [22163] Tue Jul  2 13:36:34 2002
procmail: Error while writing to "
printf '$SOMEVAR='"     '${SOMEVAR}'\n" >&2

What am I missing re the "LOG" variable?
What am I doing wrong in my 'catch-all' rule?
Is there some other simple way to do this?
If this is covered in a man page or a FAQ somewhere and I've somehow
just missed it, a pointer to the relevant passage would be appreciated.

- Kenn Goutal ; mailto:kenn(_at_)mv(_dot_)com ; http://www.mv.com/users/kgg


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

<Prev in Thread] Current Thread [Next in Thread>