procmail
[Top] [All Lists]

Re: LOG= entries in logfile

1998-08-18 08:15:29
|Tue 1998-08-18 Fred Donck <fred(_at_)Donck(_dot_)com> list.procmail
| 
| I have been going through the FAQ and other relevant info but can't find
| the answer I need.

Maybe you forgot to look at pm-tips.txt...

| How can I ensure when I put a LOG="<string>" in my procmailrc that this 
| <string> is terminated with a newline in the logfile. Currently I get
| strings in the logfile that are not newline-terminated so all strings end
| up on one line in the logfile
| 
| <string\n> does not work either because when I do that I see the literal
| \n in the logfile.

Use intructions in X-info to get the file of print the .html file
to nearest printer, I recomment printing 4 pages on A4, because the doc is
too long otherwise. 

    ftp://cs.uta.fi/pub/ssjaaa/pm-tips.html     1.50 1998/08/17

You may find section 

            22.29 Variable LOG and LOGFILE

interesting, because I discuss about the use of LOG against variable
"dummy" when printing log messages. It all depends how you want your
messages logged.

Cheers!
jari

excerpt, (eg. Search for "newline")

    1.6 Variables used in recipes

        These are part of the procmail module pm-javar.rc and are used in
        recipes.

            # Pure newline; typical usage: LOG = "$NL message $NL"

            NL = "
            "

        Refer to "improving Space-Tab syndrome" section for more details

            WSPC    = "     "               # whitespace: space + tab
            SPC     = "[$WSPC]"             # Regexp: space + tab
            NSPC    = "[^$WSPC]"            # negation
            WSPCL   = "( |  |$)"            # whitespace + linefeed: spc/tab/nl

            s       = $SPC                  # shortname: like perl -- \s
            d       = "[0-9]"               # A digit -- Perl \d
            w       = "[0-9a-z_A-Z]"        # A word  -- Perl \w
            W       = "[^0-9a-z_A-Z]"       # A word  -- Perl \W
            a       = "[a-zA-Z]"            # A word, only alphabets

        Writing recipes is now a little easier and may look more clear.

            *$ Header:$s+$d+$s+$d           # Matches "Header: 11 12"


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