procmail
[Top] [All Lists]

Re: STDOUT output?

2002-12-13 18:04:36
Ricardo followed up,

| Thanks again David.

You're welcome.

| So the "LOG=" can only be used for stderr? Your example worked, thanks!

Anything assigned to LOG is written to stderr (without an automatic trailing
newline, so if you want it to have a closing newline, include the newline [or
a soft-quoted variable for it] explicitly in the string).  So is stdout of
commands in TRAP.  When procmail is invoked, stderr is inherited from the
calling process, but assigning LOGFILE redirects it.  Unsetting LOGFILE or
setting LOGFILE to null closes stderr.  Once stderr in a procmail rcfile is
directed to a file or closed, there is no way to point it back to the console
screen nor to merge it with stdout.

| Is it too cumbersome to have multiple "echo" sections? What I mean is, I
| might want to place an echo in each action block, to report to the
| calling program.

Yecch.  One was ugly; two would be frightful; three would be chimeric.

Let me ask this: could you have procmail send stderr, rather than stdout, to
the other program?  Then you could use LOG= assignments to file those reports.
That would be much cleaner than having another echoing clone for each one.


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