X-Git-Url: http://www.privoxy.org/gitweb/?a=blobdiff_plain;f=tools%2Fprivoxy-log-parser.pl;h=d0851f55c6e2d1ab1f58488aff533a3fa4234ed2;hb=f1e6c169ab2e79df35ffc7299e67566b3b48ba7b;hp=5215267eb9da3c8f27ed99a978490e4749fbb969;hpb=01f2086bd873575156c3a96abb8abaf567a556fc;p=privoxy.git diff --git a/tools/privoxy-log-parser.pl b/tools/privoxy-log-parser.pl index 5215267e..d0851f55 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.53 2009/10/08 11:45:56 fabiankeil Exp $ +# $Id: privoxy-log-parser.pl,v 1.55 2009/10/08 11:47:12 fabiankeil Exp $ # # TODO: # - LOG_LEVEL_CGI, LOG_LEVEL_ERROR, LOG_LEVEL_WRITE content highlighting @@ -1480,9 +1480,15 @@ sub handle_loglevel_connect ($) { } elsif ($c =~ m/^Found reusable socket/) { # Found reusable socket 9 for www.privoxy.org:80 in slot 0. + # 3.0.15 and later: + # Found reusable socket 8 for www.privoxy.org:80 in slot 2.\ + # Timestamp made 0 seconds ago. Timeout: 1. Latency: 0. $c =~ s@(?<=Found reusable socket )(\d+)@$h{'Number'}$1$h{'Standard'}@; $c = highlight_matched_host($c, '(?<=for )[^\s]+'); $c =~ s@(?<=in slot )(\d+)@$h{'Number'}$1$h{'Standard'}@; + $c =~ s@(?<=made )(\d+)@$h{'Number'}$1$h{'Standard'}@; + $c =~ s@(?<=Timeout: )(\d+)@$h{'Number'}$1$h{'Standard'}@; + $c =~ s@(?<=Latency: )(\d+)@$h{'Number'}$1$h{'Standard'}@; } elsif ($c =~ m/^Marking open socket/) { @@ -2242,11 +2248,34 @@ sub get_cli_options () { 'show-ineffective-filters' => \$cli_options{'show-ineffective-filters'}, 'accept-unknown-messages' => \$cli_options{'accept-unknown-messages'}, 'statistics' => \$cli_options{'statistics'}, - 'version' => sub { VersionMessage && exit(0) } + 'version' => sub { VersionMessage && exit(0) }, + 'help' => \&help, ); } +sub help () { + our %cli_options; + + VersionMessage(); + + print << " EOF" + +Options and their default values if they have any: + [--accept-unknown-messages] + [--html-output] + [--no-embedded-css] + [--no-msecs] + [--no-syntax-highlighting] + [--show-ineffective-filters] + [--statistics] + [--title $cli_options{'title'}] + [--version] +see "perldoc $0" for more information + EOF + ; + exit(0); +} ################################################################################ # main