[squid-users] about logformat

Antony Stone Antony.Stone at squid.open.source.it
Sun Aug 15 22:47:23 UTC 2021


On Monday 16 August 2021 at 00:25:45, Pavel Serrat wrote:

> I'm trying to customize my squid log format and I have the following
> question:

See http://www.squid-cache.org/Doc/config/logformat/

	% [encoding] [-] [[0]width] [{arg}] formatcode [{arg}]

width	minimum and/or maximum field width:
		[width_min][.width_max]
		When minimum starts with 0, the field is zero-padded.
		String values exceeding maximum width are truncated.

> What is the difference between %6tr and %tr ???

%tr gives you the millisecond response time.
%6tr gives you the millisecond response time padded with spaces to at least 6 
characters.

> What does %03>Hs mean?

It means the HTTP status code sent to the client, padded with zeroes to 3 
characters.

> Is the same %03tu as %tu?

No.

The former is zero-padded to at least three characters, the latter is 
unpadded.

042 is not the same as 42.


Antony.

-- 
Why is "dyslexia" so difficult to spell, and why can I never remember "aphasia" 
when I want to?

                                                   Please reply to the list;
                                                         please *don't* CC me.


More information about the squid-users mailing list