On Fri, Apr 04, 2003 at 10:33:43AM +0200, Bernd Eidenschink wrote:

> I just tried "analog", the log analyzer tool, on a dozen of access.log's

> The first problem was that the german locale was used to produce
> the month part of the date, so March became "M�r" instead of "Mar". I
> "solved" this quickly with emacs... Is this a usual problematic side
> effect with using locales, a problem the analyzing tool has to cope
> with or smth. that should be changed in the logging code of the server?

I don't know, but AOLserver uses localtime() to format the timestamp
for the logs.  You could pretty easily change it to use gmtime()
instead, but I don't know if gmtime also uses locale formatting as
well or not.  If it does, you could always make AOLserver log the date
in unix epoch format instead.  That's pretty annoying for a human
reading the logs, but it's easy to do:  E.g., at least for 3.3+ad13,
edit aolserver/nslog/nslog.c like so:

<       Ns_LogTime(buf);
---
>         int log_local_time_p = NS_TRUE;
>
>         Ns_ConfigGetBool("ns/parameters", "log_local_time_p", &log_local_time_p);
>         if (log_local_time_p == NS_TRUE) {
>             Ns_LogTime(buf);
>         } else {
>             /*
>              * Instead of the nice formatted time string, simply spit out
>              * the unix epoch time:
>              */
>            sprintf(buf, "[%ld]", (long) time(NULL));
>         }

That does both the access and the error logs.  Maybe better to change
Analog to support locales though, instead.

--
Andrew Piskorski <[EMAIL PROTECTED]>
http://www.piskorski.com


--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list: http://www.aolserver.com/listserv.html
List information and options: http://listserv.aol.com/

Reply via email to