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
This commit is contained in:
Matt Simerson 2012-05-04 16:28:39 -04:00 committed by Robert
parent 6031e49da8
commit c3626f2123
2 changed files with 6 additions and 6 deletions

View File

@ -132,9 +132,9 @@ sub varlog {
return if $trace > $TraceLevel; return if $trace > $TraceLevel;
# no logging plugins registered, fall back to STDERR # no logging plugins registered, fall back to STDERR
my $prefix = defined $plugin && defined $hook ? " $plugin plugin ($hook):" : my $prefix = defined $plugin && defined $hook ? " ($hook) $plugin:" :
defined $plugin ? " $plugin plugin:" : defined $plugin ? " $plugin:" :
defined $hook ? " running plugin ($hook):" : ''; defined $hook ? " ($hook) running plugin:" : '';
warn join(' ', $$ . $prefix, @log), "\n"; warn join(' ', $$ . $prefix, @log), "\n";
} }

View File

@ -32,9 +32,9 @@ sub hook_logging {
return DECLINED if $trace > $self->{_level}; return DECLINED if $trace > $self->{_level};
my $prefix = defined $plugin && defined $hook ? " $plugin plugin ($hook):" : my $prefix = defined $plugin && defined $hook ? " ($hook) $plugin:" :
defined $plugin ? " $plugin plugin:" : defined $plugin ? " $plugin:" :
defined $hook ? " running plugin ($hook):" : ''), defined $hook ? " ($hook) running plugin:" : '';
warn join(' ', $$ . $prefix, @log), "\n"; warn join(' ', $$ . $prefix, @log), "\n";