diladele / squid-ubuntu

Latest version of Squid proxy recompiled with support for HTTPS filtering and SSL inspection on Ubuntu 22.04 LTS. Used in Web Safety web filter for Squid.

Home Page:https://docs.diladele.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ERROR: logformat squid is already defined. Ignoring

ThomasCr opened this issue · comments

Hi,

I try to change logformat, because I want to log dns names, instead of ip adresses - so I changed the a to A from the default definition. But squid's cache.log shows the error message:

ERROR: logformat squid is already defined. Ignoring

But logformat is in squid.conf only once defined. I also checked the includes from and the /etc/squid/conf.d/*

Any Idea what happened?

I use your version:


root@proxy:~# dpkg -l|grep squid
ii  squid                                 4.6-1                                       amd64        Full featured Web Proxy cache (HTTP proxy)
ii  squid-common                          4.6-1                                       all          Full featured Web Proxy cache (HTTP proxy) - common files
ii  squid-langpack                        20170901-1                                  all          Localized error pages for Squid
ii  squidanalyzer                         6.6-1ubuntu0~bionic1                        all          Squid proxy log analyzer and report generator
ii  squidclient                           4.6-1                                       amd64        Full featured Web Proxy cache (HTTP proxy) - HTTP(S) message utility
ii  squidguard                            1.5-6                                       amd64        filter and redirector plugin for Squid

When I use the same conf and downgrade with the follow command to distibution packages from 18.04 the logformat works without any problems:
apt install squid=3.5.27-1ubuntu1.1 squid-common=3.5.27-1ubuntu1.1 squidclient=3.5.27-1ubuntu1.1

Hello Thomas,

What exactly do I need to put into Squid conf of 4.6 to reproduce the problem?

there is a default line for squid logformat - just copy it comment it in and change the first small a to A.

#       The default formats available (which do not need re-defining) are:
#
#logformat squid      %ts.%03tu %6tr %>a %Ss/%03>Hs %<st %rm %ru %[un %Sh/%<a %mt
logformat squid      %ts.%03tu %6tr %>A %Ss/%03>Hs %<st %rm %ru %[un %Sh/%<a %mt

thats how it worked on squid 3.5

Hi, have you found time to take a look into it?

I reported this upstream https://bugs.squid-cache.org/show_bug.cgi?id=4935 - because I think this is a better place.

Or have you patched squid with some tweaks related to the issue?

ok, I found this was introduced in squid upstream:

squid-cache/squid@9d63df8#diff-7853fc559b7c4922301c47cb5f79184a

Ok, I have found a workaround - I define my own logformat and override access_log definition like this:

logformat squid-host      %ts.%03tu %6tr %>A %Ss/%03>Hs %<st %rm %ru %[un %Sh/%<a %mt
access_log daemon:/var/log/squid/access.log squid-host