[Privoxy-commits] [privoxy] 07/07: privoxy-log-parser: Highlight the socket number in 'debug 16' messages
User Git
git at git.privoxy.org
Sun Oct 2 09:48:28 CEST 2022
This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository privoxy.
commit a96055c60c67bd8eec2ebd3627fafe0f852643ba
Author: Fabian Keil <fk at fabiankeil.de>
AuthorDate: Fri Sep 30 07:35:31 2022 +0200
privoxy-log-parser: Highlight the socket number in 'debug 16' messages
---
tools/privoxy-log-parser.pl | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/tools/privoxy-log-parser.pl b/tools/privoxy-log-parser.pl
index c248ec66..52105fb5 100755
--- a/tools/privoxy-log-parser.pl
+++ b/tools/privoxy-log-parser.pl
@@ -2229,6 +2229,24 @@ sub handle_loglevel_received($) {
return $c;
}
+sub handle_loglevel_writing($) {
+
+ my $c = shift;
+
+ if ($c =~ m/^to socket/) {
+ # to socket 11: HTTP/1.1 200 Connection established\x0d\x0a\x0d\x0a
+
+ $c =~ s@(?<=to socket )(\d+)@$h{'Number'}$1$h{'Standard'}@;
+
+ } elsif ($c =~ m/^TLS on socket /) {
+ # TLS on socket 9: o~\xfcS[\xfa\x8f\xd6\x96\xe6_\xc7$\x1b[...]
+
+ $c =~ s@(?<=TLS on socket )(\d+)@$h{'Number'}$1$h{'Standard'}@;
+ }
+
+ return $c;
+}
+
sub handle_loglevel_ignore($) {
return shift;
}
@@ -2686,7 +2704,7 @@ sub parse_loop() {
'Force' => \&handle_loglevel_force,
'Error' => \&handle_loglevel_error,
'Fatal error' => \&handle_loglevel_ignore,
- 'Writing' => \&handle_loglevel_ignore,
+ 'Writing' => \&handle_loglevel_writing,
'Received' => \&handle_loglevel_received,
'Tagging' => \&handle_loglevel_tagging,
'Actions' => \&handle_loglevel_ignore,
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Privoxy-commits
mailing list