Timestamps of access log entries
am 07.04.2010 14:25:07 von steve.foster------_=_NextPart_001_01CAD64D.5B61484E
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Hi there,
=20
I am having troubles with the switch over between GMT and BST with
respect to the entries going in the log files, I am using apache 2.0.55
BTW.
=20
The timezones on our servers are set to GB and during British Wintertime
the log file entries are stamped correctly, however when moving to BST I
have to add the following to the apache startup script to get the
timestamps in BST format.
=20
TZ=3DGMT0BST
export TZ
=20
And obviously remember to take this out when returning back to GMT in
October.
=20
For the actual logfile configuration I use the following:
=20
Logformat "%{%Y-%m-%d %H:%M:%S}t %{X-Forwarded-For}i %{host}i %r %s %b
%D %q %{User-Agent}i %{IR_PORTAL_COOKIE}C %{Referer}i" ORU_extended
CustomLog "|/opt/app/apache/bin/rotatelogs
/opt/app/apache/logs/site_access_log.%Y-%m-%d 86400" ORU_extended
=20
Is there any other way of ensuring the correct localtime gets put into
the logfile entries?? I have tried using %X in place of %H:%M:%S but
this has no effect.
=20
Cheers
=20
Steve
=20
=20
=20
=20
=20
=20
Capgemini is a trading name used by the Capgemini Group of companies =
which includes Capgemini UK plc, a company registered in England and =
Wales (number 943935) whose registered office is at No. 1 Forge End, =
Woking, Surrey, GU21 6DB.
This message contains information that may be privileged or confidential =
and is the property of the Capgemini Group. It is intended only for the =
person to whom it is addressed. If you are not the intended recipient, =
you are not authorized to read, print, retain, copy, disseminate, =
distribute, or use this message or any part thereof. If you receive this =
message in error, please notify the sender immediately and delete all =
copies of this message.
------_=_NextPart_001_01CAD64D.5B61484E
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
xmlns=3D"http://www.w3.org/TR/REC-html40">
charset=3Dus-ascii">
style=3D'font-size:10.0pt;
font-family:Arial'>Hi there,
style=3D'font-size:10.0pt;
font-family:Arial'>
style=3D'font-size:10.0pt;
font-family:Arial'>I am having troubles with the switch over between GMT =
and
BST with respect to the entries going in the log files, I am using =
apache
2.0.55 BTW.
style=3D'font-size:10.0pt;
font-family:Arial'>
style=3D'font-size:10.0pt;
font-family:Arial'>The timezones on our servers are set to GB and during
British Wintertime the log file entries are stamped correctly, however =
when
moving to BST I have to add the following to the apache startup script =
to get
the timestamps in BST format.
style=3D'font-size:10.0pt;
font-family:Arial'>
style=3D'font-size:10.0pt;
font-family:Arial'>TZ=3DGMT0BST
style=3D'font-size:10.0pt;
font-family:Arial'>export TZ
style=3D'font-size:10.0pt;
font-family:Arial'>
style=3D'font-size:10.0pt;
font-family:Arial'>And obviously remember to take this out when =
returning back
to GMT in October.
style=3D'font-size:10.0pt;
font-family:Arial'>
style=3D'font-size:10.0pt;
font-family:Arial'>For the actual logfile configuration I use the =
following:
style=3D'font-size:10.0pt;
font-family:Arial'>
style=3D'font-size:10.0pt;
font-family:Arial'>Logformat "%{%Y-%m-%d %H:%M:%S}t =
%{X-Forwarded-For}i
%{host}i %r %s %b %D %q %{User-Agent}i %{IR_PORTAL_COOKIE}C =
%{Referer}i"
ORU_extended
style=3D'font-size:10.0pt;
font-family:Arial'>CustomLog "|/opt/app/apache/bin/rotatelogs
/opt/app/apache/logs/site_access_log.%Y-%m-%d 86400" =
ORU_extended
style=3D'font-size:10.0pt;
font-family:Arial'>
style=3D'font-size:10.0pt;
font-family:Arial'>Is there any other way of ensuring the correct =
localtime
gets put into the logfile entries?? I have tried using %X in place of =
%H:%M:%S
but this has no effect.
style=3D'font-size:10.0pt;
font-family:Arial'>
style=3D'font-size:10.0pt;
font-family:Arial'>Cheers
style=3D'font-size:10.0pt;
font-family:Arial'>
style=3D'font-size:10.0pt;
font-family:Arial'>Steve
style=3D'font-size:10.0pt;
font-family:Arial'>
style=3D'font-size:10.0pt;
font-family:Arial'>
style=3D'font-size:10.0pt;
font-family:Arial'>
style=3D'font-size:10.0pt;
font-family:Arial'>
style=3D'font-size:
12.0pt'>
style=3D'font-size:
12.0pt'>
Capgemini is a trading name used by =
the Capgemini Group of companies which includes Capgemini UK plc, a =
company registered in England and Wales (number 943935) whose registered =
office is at No. 1 Forge End, Woking, Surrey, GU21 =
6DB.
This message contains =
information that may be privileged or confidential and is the property =
of the Capgemini Group. It is intended only for the person to whom it is =
addressed. If you are not the intended recipient, you are not authorized =
to read, print, retain, copy, disseminate, distribute, or use this =
message or any part thereof. If you receive this message in error, =
please notify the sender immediately and delete all copies of this =
message.
------_=_NextPart_001_01CAD64D.5B61484E--