Permalink
Browse files

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

Conflicts:

	plugins/logging/warn
  • Loading branch information...
1 parent 6031e49 commit c3626f2123b31a5a46282c1fce9b8526a3ad319c @msimerson msimerson committed with rspier May 4, 2012
Showing with 6 additions and 6 deletions.
  1. +3 −3 lib/Qpsmtpd.pm
  2. +3 −3 plugins/logging/warn
View
@@ -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";
}
View
@@ -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";

0 comments on commit c3626f2

Please sign in to comment.