[squid-users] Modifying the log format
Greetings, I'm interested in changing the timestamp format in the squid log files, as I'd rather read a local time than seconds since epoch. I have two questions: 1. I've been able to change the format of the output in my access_log by defining a logformat as follows (this is the default format except with seconds since epoch replaced with local time): logformat accessLogFormat %tl %a %Ss/%03Hs %st %rm %ru %un %Sh/%A %mt I'd like to further customize the time format of the local time (%tl) to be %Y/%m/%d:%H:%M:%S %z , but the docs don't make it very clear on how to supply the strftime format argument. Can someone explain what the correct syntax is? I've tried a few ways, but none of them worked. 2. I'd like to change the timestamps in my cache_store_log as well. Is this possible? Thanks for your time, -Adam
Re: [squid-users] Modifying the log format
ons 2010-12-22 klockan 12:37 -0800 skrev Volker-Yoblick, Adam: I'd like to further customize the time format of the local time (%tl) to be %Y/%m/%d:%H:%M:%S %z , but the docs don't make it very clear on how to supply the strftime format argument. Can someone explain what the correct syntax is? I've tried a few ways, but none of them worked. Condensed squid.conf.documented quote: % format codes all follow the same basic structure where all but the formatcode is optional. % [|[|'|#] [-] [[0]width] [{argument}] formatcode Time related format codes: tl Local time. Optional strftime format argument default %d/%b/%Y:%H:%M:%S %z Which gives %{%Y/%m/%d:%H:%M:%S %z}tl 2. I'd like to change the timestamps in my cache_store_log as well. Is this possible? No. But most people disable cache_store_log anyway. It adds very little information unless you are debugging or analyzing specific store interactions. Regards Henrik