Amos Jeffries wrote:
> Dayo Adewunmi wrote:
>> Hi all
>>
>> In /var/log/squid/access.log on Ubuntu 8.04, squid 2.6.18-1ubuntu3
>> the log lines get
>> written to file with the epoch time, instead of the human-readable time.
>> How can I get squid to write to access.log with human-readable time?
>
> You need a custom log format. copy the example squid logformat entry
> from squid.conf.documented / squid.conf.default and change the
> %ts.%03tu to %tl
>
> logformat customfmt %tl ....
> access_log /var/log/squid/access.log customfmt
>
>
> NP: this will screw up any automatic log processors you use which
> process squid native log format. To fix that you may need to have two
> access_log outputs one in the custom and one in squid native format.
>
>
> logformat customfmt %tl ....
> access_log /var/log/squid/access-localtime.log customfmt
> access_log /var/log/squid/access.log squid
>
> Amos
Thanks, Amos. That worked real nicely.
Best regards
Dayo
Received on Mon Feb 01 2010 - 13:25:01 MST
This archive was generated by hypermail 2.2.0 : Mon Feb 01 2010 - 12:00:05 MST