websafety icon indicating copy to clipboard operation
websafety copied to clipboard

how to log query terms to some domains only (to minimize amount of info stored in the logs)

Open ra-at-diladele-com opened this issue 4 years ago • 1 comments

I have below option globally, which I don't want to make "off" strip_query_terms on

acl track dstdomain "/etc/squid/sites_track.txt" access_log /var/log/squid/full_site_links.log squid_custom track

however for specific ACL I would like to log full URL with query parameters, how this can be done ?

I have not tested this, and the results may be version-dependent, but according to logformat documentation[1], %ru honors strip_query_terms while %>ru does not:

logformat strippedFormat %ts... %ru ...
access_log ... strippedFormat track !specific_ACL

logformat detailedFormat %ts... %>ru ...
access_log ... detailedFormat track specific_ACL

[1] http://www.squid-cache.org/Doc/config/logformat/

ra-at-diladele-com avatar May 02 '20 07:05 ra-at-diladele-com

Need to confirm if this works. Would be very useful for youtube/google reporting.

ra-at-diladele-com avatar May 02 '20 07:05 ra-at-diladele-com