[squid-users] squid 6.1 new lines when i do squid -k reconfigure

Alex Rousskov rousskov at measurement-factory.com
Fri Jul 7 14:40:35 UTC 2023


On 7/7/23 09:50, robert k Wild wrote:

> i think this is a new feature in squid as i never saw it in squid 4/5 

It is, essentially, a bug fix: Depending on the Squid version, these 
lines were previously either logged to unlocked cache.log or not logged 
at all.


> basically when you do
> 
> /usr/local/squid/sbin/squid -k reconfigure
> 
> you get back a blank line but now you get information regarding the 
> reconfigure which is a nice touch but how do you get rid of it, ie only 
> show back errors

Unfortunately, Squid developers lack consensus regarding which lines 
should be logged at debug levels 0 and 1. Fortunately, you can now 
control many of these messages using cache_log_message directive:

http://www.squid-cache.org/Doc/config/cache_log_message/

For example, the following configuration will raise the level of the 
reconfiguration messages sampled below to 2:

     cache_log_message id=4 level=2
     cache_log_message id=68 level=2


> 2023/07/07 09:43:54| Processing Configuration File: /usr/local/squid/etc/squid.conf (depth 0)
> 2023/07/07 09:43:54| Processing Configuration File: /usr/local/squid/etc/squidrules.conf (depth 1)

The above messages have ID 68.


> 2023/07/07 09:43:54| Set Current Directory to /usr/local/squid/var/cache/squid

The above message has ID 4.


See doc/debug-messages.dox for message IDs. If the message you want to 
control is not covered, see 
https://wiki.squid-cache.org/SquidFaq/AboutSquid#how-to-add-a-new-squid-feature-enhance-of-fix-something


Please note that messages printed before Squid configuration is parsed 
for the very first time are not controlled by that configuration. We 
plan to address that limitation by accepting "early" configuration 
options from the command line, but I cannot give you an ETA for that 
feature delivery because the corresponding project is currently dormant.


HTH,

Alex.



More information about the squid-users mailing list