Tuesday, November 11, 2008

วันที่และเวลาใน log ของ squid

ความเห็น 1

Open your squid.conf and search for the line that starts with access_log or cache_access_log and looks like:

Code:
access_log /var/log/squid/access.log squidOf course the path to the logfile may vary in your case.
Note the last keyword (in this case squid, but it could be common, combined, squidmime). Then look for the line that starts with logformat and change "%ts.%03tu" with "%tl" fro local time or "%tg" fro GMT time. If the line does not exist you should add it. For the above example it should changed from:

Code:
logformat squid %ts.%03tu %6tr %>a %Ss/%03Hs %
Code:
logformat squid %tl %6tr %>a %Ss/%03Hs %============
ความเห็น 2
emulate_httpd_log on

This is explained in the squid.conf.default:

# TAG: emulate_httpd_log on|off
# The Cache can emulate the log file format which many 'httpd'
# programs use. To disable/enable this emulation, set
# emulate_httpd_log to 'off' or 'on'. The default
# is to use the native log format since it includes useful
# information Squid-specific log analyzers use.
#
#Default:
# emulate_httpd_log off

ขอบคุณ
http://www.linuxquestions.org/questions/linux-general-1/adding-date-and-time-to-squid-access.log-589410/

0 comments:

Twitter Delicious Facebook Digg Stumbleupon Favorites More