[squid-users] squid log responce time %6tr or %tr ?

Alex Rousskov rousskov at measurement-factory.com
Mon Dec 23 16:38:22 UTC 2019


On 12/22/19 5:53 AM, Ahmad Alzaeem wrote:

> im confused on why default response time configured as %6tr not %tr

Many Squid developers look at raw access logs. I suspect early Squid
developers wanted to first (or "left") access.log fields at a semi-fixed
position. Making most response time entries 6 characters long helps with
that goal.


> is there any difference between %tr and %6tr ?

Yes, %6tr is padded with spaces on the left (if its value is smaller
than 1000000) to make the entire value at least 6 characters long. This
is semi-documented in logformat directive description (look for
"width"): http://www.squid-cache.org/Doc/config/logformat/

Alex.


More information about the squid-users mailing list