Skip to content
Permalink
Browse files

Item11545: fix excessive Statistics debug logging

 - Skip any _template web activity.
 - Add resetpasswd, sudo login and logout to the list of ignored events
 - Only log to debug.log if Asserts are enabled.

git-svn-id: http://svn.foswiki.org/trunk@14041 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information...
GeorgeClark GeorgeClark
GeorgeClark authored and GeorgeClark committed Feb 21, 2012
1 parent 5a95e62 commit 425cc73c65ba806a9858fa557e5e79f16cdfa8ed
Showing with 8 additions and 3 deletions.
  1. +8 −3 core/lib/Foswiki/UI/Statistics.pm
@@ -287,8 +287,8 @@ sub _collectLogData {
# ignore events that are not statistically helpful
next if ( $notes && $notes =~ /dontlog/ );

# ignore searches for now - idea: make a "top search phrase list"
next if ( $opName && $opName =~ /search|renameweb|changepasswd/ );
# ignore events statistics doesn't understand for now - idea: make a "top search phrase list"
next if ( $opName && $opName =~ /search|renameweb|changepasswd|resetpasswd|sudo login|logout/ );

# .+ is used because topics name can contain stuff like
# !, (, ), =, -, _ and they should have stats anyway
@@ -345,8 +345,13 @@ sub _collectLogData {
}
}
else {

# ignore template webs. (Regex copied from Foswiki::WebFilter)
my ($w, $t) = split( /\./, $webTopic);
next if $w =~ /(?:^_|\/_)/;

$session->logger->log( 'debug',
'WebStatistics: Bad logfile line ' . join( '|', @$line ) );
'WebStatistics: Bad logfile line ' . join( '|', @$line ) ) if (DEBUG);
}
}

0 comments on commit 425cc73

Please sign in to comment.
You can’t perform that action at this time.