To use any of the formats, you need to add the following line in the squid.conf file:
access_log <filepath> <logformat name>
In ProxyInspector, select the name of the necessary format, specify the path to log files and the mask:
However, formats do not contain fields by default:
%mt - MIME content type
%rp - Request URL-Path excluding hostname
%{Referer}>h - HTTP Referer
These fields are not mandatory, but are used by ProxyInspector for report generation. ProxyInspector comes with predefined and modified formats of access logs containing the following fields:
logformat squidmod %ts.%03tu %6tr %>a %Ss/%03>Hs %<st %rm %ru %un %Sh/%<A %mt %rp "%{Referer}>h"
logformat squidmimemod %ts.%03tu %6tr %>a %Ss/%03>Hs %<st %rm %ru %un %Sh/%<A %mt %rp [%>h] [%<h] "%{Referer}>h"
logformat commonmod %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %>Hs %<st %Ss:%Sh %mt %rp "%{Referer}>h"
We recommend using these formats with %mt and %rp fields. To do this, you need to add a format line to the squid.conf file and specify it in the access_log directive. Once done, restart the Squid proxy server.
You can also use another format of log files. To do this, select a "Custom" format in ProxyInspector and manually set the positions of all fields in a line (starting from 0):
Tags: Squid, ProxyInspector, squid.conf, access.log, log file