[squid-users] How to log ACL to custom log
Alex Rousskov
rousskov at measurement-factory.com
Thu Aug 25 16:06:11 UTC 2016
On 08/25/2016 09:27 AM, Michael Pelletier wrote:
> I would like to log ACLs Pass \ Blocks in the access.log.
If you want to log the name of the ACL that resulted in an http_access
allow or deny decision, then there is only poor/indirect support for
that right now AFAIK: You can kind of do that via an annotation-setting
external ACL at the end of each http_access rule, but that is not a good
solution for many reasons.
The upcoming annotate_transaction ACLs will help with that, but even
they are not a good solution if you have many http_access rules.
Squid already has a concept of a "blocking ACL name" because deny_info
needs that. The underlying implementation is extremely kludgey and not
reliable. We should support this better and make the blocking ACL name
available via a new logformat code, at least. I do not think this would
be very difficult to implement, but decent knowledge of ACL code may be
required to replace the kludge mentioned above.
HTH,
Alex.
More information about the squid-users
mailing list