projects
/
privoxy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a3e108c
)
Additionally accept ISO 8601 time stamps.
author
Fabian Keil
<fk@fabiankeil.de>
Sun, 20 Feb 2011 13:17:16 +0000
(13:17 +0000)
committer
Fabian Keil
<fk@fabiankeil.de>
Sun, 20 Feb 2011 13:17:16 +0000
(13:17 +0000)
tools/privoxy-log-parser.pl
patch
|
blob
|
history
diff --git
a/tools/privoxy-log-parser.pl
b/tools/privoxy-log-parser.pl
index
5bb6bfd
..
15460d5
100755
(executable)
--- a/
tools/privoxy-log-parser.pl
+++ b/
tools/privoxy-log-parser.pl
@@
-8,7
+8,7
@@
#
# http://www.fabiankeil.de/sourcecode/privoxy-log-parser/
#
#
# http://www.fabiankeil.de/sourcecode/privoxy-log-parser/
#
-# $Id: privoxy-log-parser.pl,v 1.1
09 2011/01/09 12:09:21
fabiankeil Exp $
+# $Id: privoxy-log-parser.pl,v 1.1
10 2011/01/14 19:47:53
fabiankeil Exp $
#
# TODO:
# - LOG_LEVEL_CGI, LOG_LEVEL_ERROR, LOG_LEVEL_WRITE content highlighting
#
# TODO:
# - LOG_LEVEL_CGI, LOG_LEVEL_ERROR, LOG_LEVEL_WRITE content highlighting
@@
-2177,7
+2177,7
@@
sub parse_loop () {
while (<>) {
while (<>) {
- if (m/^(\w{3} \d{2}) (\d\d:\d\d:\d\d)\.?(\d+)? (?:Privoxy\()?([^\)\s]*)[\)]? ([\w -]*): (.*?)\r?$/) {
+ if (m/^(\
d{4}-\d{2}-\d{2}|\
w{3} \d{2}) (\d\d:\d\d:\d\d)\.?(\d+)? (?:Privoxy\()?([^\)\s]*)[\)]? ([\w -]*): (.*?)\r?$/) {
$thread = $t = ($shorten_thread_ids) ? shorten_thread_id($4) : $4;
$req{$t}{'day'} = $day = $1;
$req{$t}{'time-stamp'} = $time_stamp = $2;
$thread = $t = ($shorten_thread_ids) ? shorten_thread_id($4) : $4;
$req{$t}{'day'} = $day = $1;
$req{$t}{'time-stamp'} = $time_stamp = $2;
@@
-2267,7
+2267,7
@@
sub stats_loop () {
);
while (<>) {
);
while (<>) {
- if (m/^(\w{3} \d{2}) (\d\d:\d\d:\d\d)\.?(\d+)? (?:Privoxy\()?([^\)\s]*)[\)]? ([\w -]*): (.*?)\r?$/) {
+ if (m/^(\
d{4}-\d{2}-\d{2}|\
w{3} \d{2}) (\d\d:\d\d:\d\d)\.?(\d+)? (?:Privoxy\()?([^\)\s]*)[\)]? ([\w -]*): (.*?)\r?$/) {
$day = $1;
$time_stamp = $2;
$msecs = $3 ? $3 : 0;
$day = $1;
$time_stamp = $2;
$msecs = $3 ? $3 : 0;
@@
-2297,7
+2297,7
@@
sub unbreak_lines_only_loop() {
chomp;
# Log level other than LOG_LEVEL_CLF?
chomp;
# Log level other than LOG_LEVEL_CLF?
- if (m/^(\w{3} \d{2}) (\d\d:\d\d:\d\d)\.?(\d+)? (?:Privoxy\()?([^\)\s]*)[\)]? ([\w -]*): (.*?)\r?$/ or
+ if (m/^(\
d{4}-\d{2}-\d{2}|\
w{3} \d{2}) (\d\d:\d\d:\d\d)\.?(\d+)? (?:Privoxy\()?([^\)\s]*)[\)]? ([\w -]*): (.*?)\r?$/ or
# LOG_LEVEL_CLF?
m/^((?:\d+\.\d+\.\d+\.\d+|[:\d]+)) - - \[(.*)\] "(.*)" (\d+) (\d+)/) {
$log_messages_reached = 1;
# LOG_LEVEL_CLF?
m/^((?:\d+\.\d+\.\d+\.\d+|[:\d]+)) - - \[(.*)\] "(.*)" (\d+) (\d+)/) {
$log_messages_reached = 1;