PRIVOXY-LOG-PARSER(1)

πŸ’… PRIVOXY-LOG-PARSER πŸ’…

okay so bestie, welcome to privoxy-log-parser β€” a little gem from the User Contributed Perl Documentation corner of the universe, and honestly? it eats. ✨


🌸 NAME 🌸

privoxy-log-parser β€” a parser and syntax-highlighter for Privoxy log messages πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

privoxy-log-parser [--detect-inactivity] [--inactivity-threshold msecs]
[--html-output] [--no-msecs] [--no-syntax-higlighting] [--statistics]
[--shorten-thread-ids] [--show-ineffective-filters]
[--url-statistics-threshold] [--version]

(yes, --no-syntax-higlighting is spelled like that up there β€” that's the manpage's spelling, not mine, i don't make the rules πŸ’€)


✨ DESCRIPTION ✨

so like, privoxy-log-parser reads Privoxy log messages and then:

  • syntax-highlights the lines it recognizes πŸ’–
  • reformats some of them so they're actually comprehensible 🫢
  • filters out the less useful messages (bye, noise) 🧚
  • and (in some cases) calculates extra info, like the compression ratio or how a filter affected the content size πŸ‘‘

the whole point? with privoxy-log-parser you should be able to crank Privoxy's log level up without getting absolutely obliterated by the resulting amount of output. like, for real β€” for debug 64, privoxy-log-parser will (by default) only show messages that affect the content. and if a filter doesn't cause any hits, privoxy-log-parser will hide the filter foo caused 0 hits message. no cap, that's the vibe check doing its job. πŸ”₯


πŸ’… OPTIONS πŸ’…

  • --detect-inactivity β€” instead of syntax highlighting, detect periods of log inactivity longer than the number of milliseconds you set with the --inactivity-threshold option. mainly useful for debugging πŸ•΅οΈβ€β™€οΈ
  • --host-statistics-threshold β€” only show the request count for a host if it's above or equal to the given threshold. if the threshold is 0, host statistics are disabled 🚫
  • --html-output β€” use HTML and CSS when syntax highlighting. if you omit this option, ANSI escape sequences are used unless --no-syntax-highlighting is active. this option is only intended to make embedding log excerpts in web pages easier. it does not escape any input! 😭
  • --inactivity-threshold msecs β€” specifies the number of milliseconds between log messages to consider inactivity when running in --detect-inactivity mode ⏱️
  • --keep-date β€” don't remove the date when printing highlighted log messages. useful when parsing multiple log files at once πŸ“…
  • --no-msecs β€” don't expect millisecond resolution πŸ™ˆ
  • --no-syntax-highlighting β€” disable syntax-highlighting. useful when the filtered output is piped into less, in which case the ANSI control codes don't work, or if the terminal itself doesn't support the control codes 🌈
  • --passed-request-statistics-threshold β€” only show the request count for a passed requests if it's above or equal to the given threshold. if the threshold is 0, passed request statistics are disabled 🚫
  • --shorten-thread-ids β€” 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 ⭐
  • --show-ineffective-filters β€” don't suppress log lines for filters that didn't modify the content πŸ‘€
  • --show-complete-request-distribution β€” show the complete client request distribution in the --statistics output. without this option only the ten most common numbers are shown πŸ”’
  • --statistics β€” gather various statistics instead of syntax highlighting log messages. this is an experimental feature, so 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't in sync 🫠
  • --strict-checks β€” when generating statistics, look more careful at the input data and abort if it's unexpected, even if it doesn't 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't be properly highlighted ⚠️
  • --unbreak-lines-only β€” 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't do anything else, so you probably want to pipe the output into privoxy-log-parser again πŸ”
  • --url-statistics-threshold β€” only show the request count for a resource if it's above or equal to the given threshold. if the threshold is 0, URL statistics are disabled 🚫
  • --version β€” print version and exit πŸ‘‹

πŸ“ EXAMPLES πŸ“

to monitor a log file:

tail -F /usr/jails/privoxy-jail/var/log/privoxy/privoxy.log | privoxy-log-parser

replace -F with -f if your tail implementation lacks -F support or if the log won't get rotated anyway. the log file location depends on your system (Doh!). πŸ™ƒ

to monitor Privoxy without having it write to a log file:

privoxy --no-daemon /usr/jails/privoxy-jail/usr/local/etc/privoxy/config 2>&1 | privoxy-log-parser

again, the config file location depends on your system. output redirection depends on your shell β€” the above works with bourne shells 🐚

to read a processed Privoxy log file from top to bottom, letting the content scroll by slightly faster than you can read:

privoxy-log-parser < /usr/jails/privoxy-jail/var/log/privoxy/privoxy.log

this is probably only useful to fill screens in the background of haxor movies 🎬 (iconic behaviour, honestly)


😭 CAVEATS 😭

syntax highlighting with ANSI escape sequences will look strange if your background color isn't black. not me designing my whole terminal around this 🌚

some messages aren't recognized yet and will not be fully highlighted 🫀

privoxy-log-parser 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 πŸ§“

Privoxy's log files tend to be rather large. if you use HTML highlighting some browsers can't handle them, get confused and will eventually crash because of segmentation faults or unexpected exceptions. this is a problem in the browser and not privoxy-log-parser's fault πŸ’€ don't blame the parser, she's doing her best


πŸ¦‹ BUGS πŸ¦‹

many settings can't be controlled through command line options yet πŸ™ˆ (we're working on it, emotionally)


πŸ‘‘ SEE ALSO πŸ‘‘

privoxy(8) β€” go say hi πŸ’œ


πŸŽ€ AUTHOR πŸŽ€

Fabian Keil <fk@fabiankeil.de> β€” a real one, fr fr 🫢


okay that's the whole page bestie, go forth and parse πŸ’–

signing off from perl v5.42.2, dated 2026-04-09 β€” catch you on the flip side, PRIVOXY-LOG-PARSER(1) style βœ¨πŸ’…

πŸ“¦ where this page comes from