#
# http://www.fabiankeil.de/sourcecode/privoxy-log-parser/
#
-# $Id: privoxy-log-parser.pl,v 1.72 2010/01/03 13:48:44 fabiankeil Exp $
+# $Id: privoxy-log-parser.pl,v 1.228 2010/02/13 15:25:10 fk Exp $
#
# TODO:
# - LOG_LEVEL_CGI, LOG_LEVEL_ERROR, LOG_LEVEL_WRITE content highlighting
CLI_OPTION_NO_EMBEDDED_CSS => 0,
CLI_OPTION_NO_MSECS => 0,
CLI_OPTION_NO_SYNTAX_HIGHLIGHTING => 0,
- CLI_OPTION_ERROR_LOG_FILE => '/var/log/privoxy-log.log',
CLI_OPTION_SHOW_INEFFECTIVE_FILTERS => 0,
CLI_OPTION_ACCEPT_UNKNOWN_MESSAGES => 0,
CLI_OPTION_STATISTICS => 0,
PUNISH_MISSING_HIGHLIGHT_KNOWLEDGE_WITH_DEATH => 1,
LOG_UNPARSED_LINES_TO_EXTRA_FILE => 0,
+ ERROR_LOG_FILE => '/var/log/privoxy-log-parser',
# You better leave these alone unless you know what you're doing.
COLOUR_RESET => "\033[0;0m",
$c =~ m/^Malformerd HTTP headers detected and MS IIS5 hack enabled/ or
$c =~ m/^Invalid \"chunked\" transfer/ or
$c =~ m/^Support for/ or
- $c =~ m/^Flushing header and buffers/
+ $c =~ m/^Flushing header and buffers/ or
+ $c =~ m/^Can not resolve/
) {
# No logfile configured. Please enable it before reporting any problems.
# Support for 'Connection: keep-alive' is experimental, incomplete and\
# known not to work properly in some situations.
# Flushing header and buffers. Stepping back from filtering.
+ # Can not resolve doesnotexist: hostname nor servname provided, or not known
} else {
sub gather_loglevel_connect_stats ($$) {
- my $c = shift;
- my $thread = shift;
+ my ($c, $thread) = @_;
our %thread_data;
our %stats;
}
}
-sub gather_loglevel_header_stats ($) {
+sub gather_loglevel_header_stats ($$) {
- my $c = shift;
- my $thread = shift;
+ my ($c, $thread) = @_;
our %stats;
if ($c =~ m/^A HTTP\/1\.1 response without/ or
sub stats_loop () {
- my ($day, $time_stamp, $thread, $log_level, $content, $c, $msecs);
+ my ($day, $time_stamp, $msecs, $thread, $log_level, $content);
my %log_level_handlers = (
'Re-Filter' => \&handle_loglevel_ignore,
'Header' => \&gather_loglevel_header_stats,
$day = $1;
$time_stamp = $2;
$msecs = $3 ? $3 : 0;
- $log_level = $5;
- $content = $c = $6;
$thread = $4;
+ $log_level = $5;
+ $content = $6;
if (defined($log_level_handlers{$log_level})) {
[B<--statistics>] Gather various statistics instead of syntax highlighting
log messages. This is an experimental feature, if the results look wrong
-they very well might be. Also note that the results a pretty much guaranteed
+they very well might be. Also note that the results are pretty much guaranteed
to be incorrect if Privoxy and Privoxy-Log-Parser aren't in sync.
[B<--version>] Print version and exit.