Robin Bowes said the following on 25/11/2005 16:54:
> Of course, the logging plugin is the one procesing the logging so the
> log method won't work, will it?

I'm now using this code:

    warn( $self->{_rejectprefix} . ' ' .
        join ",",
        ${$},
        $prev_hook,
        $return,
        $return_text,
        $sender,
        $recipients,
        $mail_size,
        $self->qp->connection->remote_host,
        $self->qp->connection->remote_ip,
        $relay_client,
        $auth_method,
        $auth_user
        . "\n"
    );

i.e. I'm writing all the information into a single, comma-separated line.

I've flattened the recipients array into a semi-colon separated string
so that's not a problem. But, there is a possibility that other fields
may contain commas.

Any suggestions as to the best way to log all this information on a
single line so it can be easily parsed by a script for statistical purposes?

Cheers,

R.
-- 
http://robinbowes.com

If a man speaks in a forest,
and his wife's not there,
is he still wrong?

Reply via email to