.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Required to disable full justification in groff 1.23.0. .if n .ds AD l .\" ======================================================================== .\" .IX Title "PRIVOXY-LOG-PARSER 1" .TH PRIVOXY-LOG-PARSER 1 2026-04-09 "perl v5.42.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME privoxy\-log\-parser \- A parser and syntax\-highlighter for Privoxy log messages .SH SYNOPSIS .IX Header "SYNOPSIS" \&\fBprivoxy\-log\-parser\fR [\fB\-\-detect\-inactivity\fR] [\fB\-\-inactivity\-threshold msecs\fR] [\fB\-\-html\-output\fR] [\fB\-\-no\-msecs\fR] [\fB\-\-no\-syntax\-higlighting\fR] [\fB\-\-statistics\fR] [\fB\-\-shorten\-thread\-ids\fR] [\fB\-\-show\-ineffective\-filters\fR] [\fB\-\-url\-statistics\-threshold\fR] [\fB\-\-version\fR] .SH DESCRIPTION .IX Header "DESCRIPTION" \&\fBprivoxy\-log\-parser\fR reads Privoxy log messages and .PP \&\- syntax\-highlights recognized lines, .PP \&\- reformats some of them for easier comprehension, .PP \&\- filters out less useful messages, and .PP \&\- (in some cases) calculates additional information, like the compression ratio or how a filter affected the content size. .PP With \fBprivoxy\-log\-parser\fR you should be able to increase Privoxy\*(Aqs log level without getting confused by the resulting amount of output. For example for "debug 64" \fBprivoxy\-log\-parser\fR will (by default) only show messages that affect the content. If a filter doesn\*(Aqt cause any hits, \fBprivoxy\-log\-parser\fR will hide the "filter foo caused 0 hits" message. .SH OPTIONS .IX Header "OPTIONS" [\fB\-\-detect\-inactivity\fR] Instead of syntax highlighting, detect periods of log inactivity of more than the amount of milliseconds specified with the \fB\-\-inactivity\-threshold\fR option. Mainly useful for debugging. .PP [\fB\-\-host\-statistics\-threshold\fR] Only show the request count for a host if it\*(Aqs above or equal to the given threshold. If the threshold is 0, host statistics are disabled. .PP [\fB\-\-html\-output\fR] Use HTML and CSS when syntax highlighting. If this option is omitted, ANSI escape sequences are used unless \fB\-\-no\-syntax\-highlighting\fR is active. This option is only intended to make embedding log excerpts in web pages easier. It does not escape any input! .PP [\fB\-\-inactivity\-threshold msecs\fR] Specifies the number of milliseconds between log messages to consider inactivity when running in [\fB\-\-detect\-inactivity\fR] mode. .PP [\fB\-\-keep\-date\fR] Don\*(Aqt remove the date when printing highlighted log messages. Useful when parsing multiple log files at once. .PP [\fB\-\-no\-msecs\fR] Don\*(Aqt expect millisecond resolution .PP [\fB\-\-no\-syntax\-highlighting\fR] Disable syntax\-highlighting. Useful when the filtered output is piped into less in which case the ANSI control codes don\*(Aqt work, or if the terminal itself doesn\*(Aqt support the control codes. .PP [\fB\-\-passed\-request\-statistics\-threshold\fR] Only show the request count for a passed requests if it\*(Aqs above or equal to the given threshold. If the threshold is 0, passed request statistics are disabled. .PP [\fB\-\-shorten\-thread\-ids\fR] Shorten the thread ids to a three\-digit decimal number. Note that the mapping from thread ids to shortened ids is created at run\-time and thus varies with the input. .PP [\fB\-\-show\-ineffective\-filters\fR] Don\*(Aqt suppress log lines for filters that didn\*(Aqt modify the content. .PP [\fB\-\-show\-complete\-request\-distribution\fR] Show the complete client request distribution in the \fB\-\-statistics\fR output. Without this option only the ten most common numbers are shown. .PP [\fB\-\-statistics\fR] 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 are pretty much guaranteed to be incorrect if Privoxy and Privoxy\-Log\-Parser aren\*(Aqt in sync. .PP [\fB\-\-strict\-checks\fR] When generating statistics, look more careful at the input data and abort if it is unexpected, even if it doesn\*(Aqt affect the results. Significantly slows the parsing down and is not expected to catch any problems that matter. When highlighting, print warnings in case of unknown messages which can\*(Aqt be properly highlighted. .PP [\fB\-\-unbreak\-lines\-only\fR] Tries to fix lines that got messed up by a broken or interestingly configured mail client and thus are no longer recognized properly. Only fixes some breakage, but may be good enough or at least better than nothing. Doesn\*(Aqt do anything else, so you probably want to pipe the output into \&\fBprivoxy\-log\-parser\fR again. .PP [\fB\-\-url\-statistics\-threshold\fR] Only show the request count for a resource if it\*(Aqs above or equal to the given threshold. If the threshold is 0, URL statistics are disabled. .PP [\fB\-\-version\fR] Print version and exit. .SH EXAMPLES .IX Header "EXAMPLES" To monitor a log file: .PP tail \-F /usr/jails/privoxy\-jail/var/log/privoxy/privoxy.log | \fBprivoxy\-log\-parser\fR .PP Replace \*(Aq\-F\*(Aq with \*(Aq\-f\*(Aq if your tail implementation lacks \*(Aq\-F\*(Aq support or if the log won\*(Aqt get rotated anyway. The log file location depends on your system (Doh!). .PP To monitor Privoxy without having it write to a log file: .PP privoxy \-\-no\-daemon /usr/jails/privoxy\-jail/usr/local/etc/privoxy/config 2>&1 | \fBprivoxy\-log\-parser\fR .PP Again, the config file location depends on your system. Output redirection depends on your shell, the above works with bourne shells. .PP To read a processed Privoxy log file from top to bottom, letting the content scroll by slightly faster than you can read: .PP \&\fBprivoxy\-log\-parser\fR < /usr/jails/privoxy\-jail/var/log/privoxy/privoxy.log .PP This is probably only useful to fill screens in the background of haxor movies. .SH CAVEATS .IX Header "CAVEATS" Syntax highlighting with ANSI escape sequences will look strange if your background color isn\*(Aqt black. .PP Some messages aren\*(Aqt recognized yet and will not be fully highlighted. .PP \&\fBprivoxy\-log\-parser\fR is developed with Privoxy 3.0.7 or later in mind, using earlier Privoxy versions will probably result in an increased amount of unrecognized log lines. .PP Privoxy\*(Aqs log files tend to be rather large. If you use HTML highlighting some browsers can\*(Aqt handle them, get confused and will eventually crash because of segmentation faults or unexpected exceptions. This is a problem in the browser and not \fBprivoxy\-log\-parser\fR\*(Aqs fault. .SH BUGS .IX Header "BUGS" Many settings can\*(Aqt be controlled through command line options yet. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBprivoxy\fR\|(8) .SH AUTHOR .IX Header "AUTHOR" Fabian Keil