I think I like the concept, I'm concerned about backwards compatibility
with people who have written log parsers.  I was going to just apply it,
but ... it doesn't apply cleanly to the head of the tree, so I'm going to
skip it for now.  Please re-sync and add an entry to Changes.

Thanks!

-R

On Sun, May 6, 2012 at 11:27 AM, Matt Simerson <m...@tnpi.net> wrote:

> in log entries, print hook name first, so log entries look like this:
>
> 86553 (connect) ident::geoip: US, United States
> 86553 (connect) ident::p0f: Windows 7 or 8
> 86553 (connect) check_earlytalker: remote host said nothing spontaneous,
> proceeding
>
> instead of this:
>
> 86553 ident::geoip: (connect): US, United States
> 86553 ident::p0f: (connect) Windows 7 or 8
> 86553 check_earlytalker: (connect): remote host said nothing spontaneous,
> proceeding
> ---
> lib/Qpsmtpd.pm       |    6 +++---
> plugins/logging/warn |    6 +++---
> 2 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/lib/Qpsmtpd.pm b/lib/Qpsmtpd.pm
> index 5d23211..a7b2a43 100644
> --- a/lib/Qpsmtpd.pm
> +++ b/lib/Qpsmtpd.pm
> @@ -132,9 +132,9 @@ sub varlog {
>    return if $trace > $TraceLevel;
>
>    # no logging plugins registered, fall back to STDERR
> -    my $prefix = defined $plugin && defined $hook ? " $plugin plugin
> ($hook):" :
> -                 defined $plugin ? " $plugin plugin:" :
> -                 defined $hook   ? " running plugin ($hook):" : '';
> +    my $prefix = defined $plugin && defined $hook ? " ($hook) $plugin:" :
> +                 defined $plugin ? " $plugin:" :
> +                 defined $hook   ? " ($hook) running plugin:" : '';
>
>    warn join(' ', $$ . $prefix, @log), "\n";
> }
> diff --git a/plugins/logging/warn b/plugins/logging/warn
> index 9d5dd73..ce41b49 100644
> --- a/plugins/logging/warn
> +++ b/plugins/logging/warn
> @@ -32,9 +32,9 @@ sub hook_logging {
>
>    return DECLINED if $trace > $self->{_level};
>
> -    my $prefix = defined $plugin && defined $hook ? " $plugin plugin
> ($hook):" :
> -                 defined $plugin ? " $plugin plugin:" :
> -                 defined $hook   ? " running plugin ($hook):" : '';
> +    my $prefix = defined $plugin && defined $hook ? " ($hook) $plugin:" :
> +                 defined $plugin ? " $plugin:" :
> +                 defined $hook   ? " ($hook) running plugin:" : '';
>
>    warn join(' ', $$ . $prefix, @log), "\n";
>
> --
> 1.7.9.6
>
>

Reply via email to