www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Turner <sr...@cam.ac.uk>
Subject mod_log-any/4366: mod_log_config can log month in local language
Date Fri, 07 May 1999 15:53:22 GMT

>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:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Fri May  7 10:10:01 PDT 1999
>Originator:     sret1@cam.ac.uk
>Release:        1.3
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.

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. :)
[In order for any reply to be added to the PR database, ]
[you need to include <apbugs@Apache.Org> 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!         ]

View raw message