Found a way to quickly view the file with readable local date format:
awk '{print strftime("%c",$1),$3,$4,$7}' access.log
You can play around with the $ variables to include/omit fields.
Dylan
Dylan Haines
Systems Technical Support Manager
HB Studios Multimedia Ltd.
Box 725, The Hive
37 Hall Street
Lunenburg, NS B0J 2C0
Tel: (902)634-8316 ext. 237
Cell: (902)553-0706
Fax: (902)634-3647
<blocked::blocked::http://www.hb-studios.com/> www.hb-studios.com
_____
From: [email protected]
[mailto:[email protected]] On Behalf Of Dylan Haines
Sent: Tuesday, July 27, 2010 3:01 PM
To: 'Tech-Geeks Mailing List'
Subject: Re: [tech-geeks] IPCOP squid logs - date format
Yeah that's about right - I remember some other Linux distro running squid
years ago that fixed with emulate_httpd. I'm hoping to avoid the parse step
and have Squid wirte the correct format to the log - there must be a way.
Thanks
Dylan
Dylan Haines
Systems Technical Support Manager
HB Studios Multimedia Ltd.
Box 725, The Hive
37 Hall Street
Lunenburg, NS B0J 2C0
Tel: (902)634-8316 ext. 237
Cell: (902)553-0706
Fax: (902)634-3647
<blocked::blocked::http://www.hb-studios.com/> www.hb-studios.com
_____
From: [email protected]
[mailto:[email protected]] On Behalf Of Brad Grafelman
Sent: Tuesday, July 27, 2010 2:56 PM
To: Tech-Geeks Mailing List
Subject: Re: [tech-geeks] IPCOP squid logs - date format
> (Julian date I think)
Looks more like a Unix timestamp, assuming that it's supposed to represent
July 27th, 2010 at 12:02:44 PM CDT (about 50 minutes ago).
Having said that, you could always parse the timestamp and display it
differently using some Unix commands. I have no idea if you can actually
change Squid to log the date in a different format, though.
Thanks,
Brad Grafelman
E-mail: [email protected]
Phone: (309) 657-5582
On Tue, Jul 27, 2010 at 12:11 PM, Dylan Haines <[email protected]>
wrote:
Hi all, has anyone figured out how to get squid logs on IPCOP to use a
normal date format instead of 1280250164.091 (Julian date I think)
I've been playing around with emulate_httpd = on in the squid.conf with no
luck.
Thanks
Dylan
Dylan Haines
Systems Technical Support Manager
HB Studios Multimedia Ltd.
Box 725, The Hive
37 Hall Street
Lunenburg, NS B0J 2C0
Tel: (902)634-8316 ext. 237
Cell: (902)553-0706
Fax: (902)634-3647
www.hb-studios.com
| Subscription info at http://www.tech-geeks.org |
| Subscription info at http://www.tech-geeks.org |