Search squid archive

Problem with %tr in custom logformat in squid-2.7

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have been using a custom logformat in squid for sometime (to feed to a custom AWStats).
The format is:

logformat awstats %>a %ui %un [%{%d/%b/%Y:%H:%M:%S +0000}tl] "%rm %ru HTTP/%rv" %Hs %<st %Ss:%Sh %tr "%{X-Frontier-Id}>h"

The %tr works fine in squid-2.6.STABLE18.  Here is a piece of a log entry:
JTS5RMFRIK8rPVUgpTcwBAD0rBmw= HTTP/1.0" 200 822 TCP_MEM_HIT:NONE 0 "-"
                                                                                                        ^                 
                                                                                                        ^

giving a 0 for a memory hit.
However, I just tried the identical logformat with squid-2.7.STABLE3 and I get:
JTS5RMFRIK8rPVUgpTcwBAD0rBmw= HTTP/1.0" 200 812 TCP_MEM_HIT:NONE - "-"
                                                                                                        ^
                                                                                                        ^
where I get a - for the time.
When there is a request with a non-zero time it seems to work:
JTS5RMFRIK8rPVUgpTcwBAD0rBmw= HTTP/1.0" 200 805 TCP_MISS:DIRECT 337 "-"
                                                                                                       ^
                                                                                                       ^
It also seems to properly give a 0 with the native squid logformat.
All the the other fields in the custom format are correct.
To see if it was my format, I tried the squidmime format as given in squid.conf which uses %6tr
for the elapsed time.  That also gave me a - for the time of memory hit.
I am using 32 bit linux OS.
What is causing the problem?

Barry

[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux