Received: (qmail 2800 invoked by uid 2012); 7 May 1999 15:53:22 -0000
Message-Id: <19990507155322.2799.qmail@hyperreal.org>
Date: 7 May 1999 15:53:22 -0000
From: Stephen Turner
Reply-To: sret1@cam.ac.uk
To: apbugs@hyperreal.org
Subject: mod_log_config can log month in local language
X-Send-Pr-Version: 3.2
>Number: 4366
>Category: mod_log-any
>Synopsis: mod_log_config can log month in local language
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: apache
>State: closed
>Class: sw-bug
>Submitter-Id: apache
>Arrival-Date: Fri May 7 10:10:01 PDT 1999
>Last-Modified: Sun May 16 16:40:34 PDT 1999
>Originator: sret1@cam.ac.uk
>Organization:
>Release: 1.3
>Environment:
any
>Description:
This issue has already been mentioned in problem report 679, but I think it
deserves a re-visit because certain important points were not raised.
The problem is that mod_log_config can, under certain circumstances, log the
month in the language specified by the LANG environment variable. The reason,
apparently, is that the date uses strftime() which is influenced by the locale,
and the locale may have been reset by another module, for example.
However, this appears to contradict the documentation which says:
%...t: Time, in common log format time format
%...{format}t: The time, in the form given by format, which should
be in strftime(3) format.
Although the latter can be defined to follow local date conventions, the former
should, according to the documentation, follow the (de facto) common log format,
which is English months.
Furthermore, logging in local language is likely to confuse log analysers. As
the author of analog, maybe I have a particular perspective, but I see the
access logs as primarily computer-readable, not human-readable (unlike the
error log). So standardised formats are a Good Thing.
>How-To-Repeat:
>Fix:
One solution is not to use strftime() for %t, but a new function. In this case,
strftime() could still be used for %{}t.
Alternatively, the LANG could be coerced to C for the logging. This solution
would be better for the log analysers, but less friendly to non-English speakers. :)
>Audit-Trail:
State-Changed-From-To: open-closed
State-Changed-By: dgaudet
State-Changed-When: Sun May 16 16:40:34 PDT 1999
State-Changed-Why:
patch from petr lampa applied to 1.3.7-dev... makes %t
always use english, but %{format}t still uses strftime()
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include in the Cc line ]
[and leave the subject line UNCHANGED. This is not done]
[automatically because of the potential for mail loops. ]
[If you do not include this Cc, your reply may be ig- ]
[nored unless you are responding to an explicit request ]
[from a developer. ]
[Reply only with text; DO NOT SEND ATTACHMENTS! ]