[squid-users] Logformat tag for a specific ACL

Amos Jeffries squid3 at treenet.co.nz
Wed May 27 11:38:40 UTC 2015


On 27/05/2015 10:04 p.m., FredB wrote:
> Hello,
> 
> There is a way to "tag" an ACL in access.log ?
> 
> acl test url_regex "/tmp/myfile"
> 
> logformat fred %>a %[ui %[un [%tl] "%rm %ru HTTP/%rv" %>Hs %<st %Ss:%Sh "%{User-Agent}>h"
> access_log daemon:/var/log/squid/access.log fred
> 
> If I put something at the end 
> 
> logformat fred %>a %[ui %[un [%tl] "%rm %ru HTTP/%rv" %>Hs %<st %Ss:%Sh "%{User-Agent}>h" test
> 
> The end of line contain test, can I do this for an Acl only ? And let the usual logformat without "test" at the end ? 

Yes, but not to the same log file. Like this:

 access_log daemon:/var/log/squid/access.log squid !test

 access_log daemon:/var/log/squid/access_test.log fred test


Amos



More information about the squid-users mailing list