How to disable logging in Squid Proxy

Some times we come across strange requirements and disabling logs of squid proxy service is one of them. Below are the simple steps to disable all kind of logging by squid service.

  • To disable access log, edit /etc/squid/squid.conf file:

‚Äčaccess_log none 

  • To disable store log, edit /etc/squid/squid.conf file: 

cache_store none 

  • To disable cache log, edit /etc/squid/squid.conf file again:

cache_log /dev/null 

logfile_rotate 0

NOTE: If /dev/null is specified to any of the above log files, logfile_rotate MUST also be set to 0 or else risk squid rotating away /dev/null making it a plain log file