[squid-users] [Feature request] add IP version to logformat format codes
Alex Rousskov
rousskov at measurement-factory.com
Fri Feb 14 16:03:50 UTC 2020
On 2/14/20 10:36 AM, Scott wrote:
> I know it's derivable by other means, but it would be nice to have a
> logformat format code that provided the client and server IP version numbers.
> eg: >v for Client IP version (4 or 6) and <v for Server
Other than client and server, Squid can log a few other IP addresses,
including:
>a Client source IP address
>la Local IP address the client connected to
la Local listening IP address the client connection was...
<a Server IP address of the last server or peer connection
<la Local IP address of the last server or peer connection
icap::<A ICAP server IP address. Similar to <A.
If we add support for automated IP version extraction, it should be
supported as a single new parameter for all existing %codes that log IP
addresses rather than new %codes (one %code for each of the existing
%codes that log IP addresses). For example:
%>a{version}
FWIW, personally, I am not sure we should add such a %code option
because, I presume, the same information can be obtained simply by
checking the first character of the logged IP address for being '['.
Said that, I am open to hearing arguments why it should be added.
Cheers,
Alex.
More information about the squid-users
mailing list