procmail
[Top] [All Lists]

Re: Put line in log

2002-10-16 11:21:14
James wrote,

| I have a procmail isse that I am debuging and would like to put a line in
| the log at a certain point.  Is that possible?  Is there something like
| "write to log".  I know I can setup a rule that catches all then do
| something like LOG="This is waht I want to say, with a $MATCH perhaps" sort
| of thing, but I was hopping there was a direct log writing tool.

That *is* the direct log writing tool: assign text to $LOG and procmail
appends it to the logfile, if one is defined and writable.  If you want a
closing newline on the text so that the next string written to the log will
begin on its own line instead of appearing to the right of what you put there
with LOG=, make sure that there's an explicit newline in the text you assign
to $LOG.  Many people like to do this near the top of their rcfiles:

NL="
"

and then use

LOG="Some text here$NL"

rather than

LOG="Some text here
"

to take care of that.


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