From: Fabian Keil Date: Wed, 13 May 2009 18:24:11 +0000 (+0000) Subject: Highlight log messages from server_keep_alive(). X-Git-Tag: v_3_0_13~99 X-Git-Url: http://www.privoxy.org/gitweb/?a=commitdiff_plain;h=44dc267e9c6369c8b3dcb639e7da5f649aa31dc3;p=privoxy.git Highlight log messages from server_keep_alive(). --- diff --git a/tools/privoxy-log-parser.pl b/tools/privoxy-log-parser.pl index 0a3cd391..948b16ef 100755 --- a/tools/privoxy-log-parser.pl +++ b/tools/privoxy-log-parser.pl @@ -8,7 +8,7 @@ # # http://www.fabiankeil.de/sourcecode/privoxy-log-parser/ # -# $Id: privoxy-log-parser.pl,v 1.24 2009/05/01 11:04:19 fabiankeil Exp $ +# $Id: privoxy-log-parser.pl,v 1.25 2009/05/10 10:20:09 fabiankeil Exp $ # # TODO: # - LOG_LEVEL_CGI, LOG_LEVEL_ERROR, LOG_LEVEL_WRITE content highlighting @@ -991,6 +991,20 @@ sub handle_loglevel_header ($) { # XXX: Could highlight more here. $content =~ s@(?<=^Content-Type: )(.*)(?= not replaced)@$h{'content-type'}$1$h{'Standard'}@; + } elsif ($c =~ m/^Server keep-alive timeout is/) { + + # Server keep-alive timeout is 5. Sticking with 10. + + $content =~ s@(?<=timeout is )(\d+)@$h{'Number'}$1$h{'Standard'}@; + $content =~ s@(?<=Sticking with )(\d+)@$h{'Number'}$1$h{'Standard'}@; + + } elsif ($c =~ m/^Reducing keep-alive timeout/) { + + # Reducing keep-alive timeout from 60 to 10. + + $content =~ s@(?<= from )(\d+)@$h{'Number'}$1$h{'Standard'}@; + $content =~ s@(?<= to )(\d+)@$h{'Number'}$1$h{'Standard'}@; + } else { found_unknown_content($content); @@ -1476,6 +1490,7 @@ sub handle_loglevel_connect ($) { # Remembering socket 13 for www.privoxy.org:80 in slot 0. # Forgetting socket 38 for www.privoxy.org:80 in slot 5. + $c =~ s@(?<=socket )(\d+)@$h{'Number'}$1$h{'Standard'}@; $c = highlight_matched_host($c, '(?<=for )[^\s]+'); $c =~ s@(?<=in slot )(\d+)@$h{'Number'}$1$h{'Standard'}@;