如何查看 Privoxy 阻止了哪些 URL

如何查看 Privoxy 阻止了哪些 URL

我想查看 Privoxy 阻止的 URL 的日志,但我在任何地方都找不到它。

我的配置文件(/usr/local/var/log/privoxy/logfile)中的相关行如下:

confdir /usr/local/etc/privoxy
logdir /usr/local/var/log/privoxy
logfile logfile

日志文件/usr/local/var/log/privoxy/logfile为空。

被阻止的 URL 是否记录在另一个文件中?或者如何打开被阻止 URL 的日志记录?

答案1

根据http://www.privoxy.org/user-manual/config.html#LOGDIR,日志文件应该位于/var/log/privoxy.然而,你有/usr/local/var/log/privoxy/

然后,日志文件捕获的详细信息取决于调试选项:

  debug     1 # Log the destination for each request Privoxy let through. See also debug 1024.
  debug     2 # show each connection status
  debug     4 # show I/O status
  debug     8 # show header parsing
  debug    16 # log all data written to the network
  debug    32 # debug force feature
  debug    64 # debug regular expression filters
  debug   128 # debug redirects
  debug   256 # debug GIF de-animation
  debug   512 # Common Log Format
  debug  1024 # Log the destination for requests Privoxy didn't let through, and the reason why.
  debug  2048 # CGI user interface
  debug  4096 # Startup banner and warnings.
  debug  8192 # Non-fatal errors
  debug 32768 # log all data read from the network
  debug 65536 # Log the applying actions

启用debug1024 应该可以满足您的需求。

相关内容