2011/7/11 Rainer Jung <rainer.j...@kippdata.de>: > On 11.07.2011 01:24, Konstantin Kolinko wrote: >> 2011/7/10 <rj...@apache.org>: >>> Author: rjung >>> Date: Sun Jul 10 11:22:40 2011 >>> New Revision: 1144833 >>> >>> URL: http://svn.apache.org/viewvc?rev=1144833&view=rev >>> Log: >>> Another regression in 7.0.18: year number formatting >>> in AccessLogValve is broken due to type "yyy" instead of "yyyy". >>> >> >> Nice catch. > > Don't know why I did not notice that earlier. I looked at access log > lines a lot since that buggy change, but only noticed it yesterday. > >> There is one more regression there: month names are now localized >> and may be printed not in English, but in other languages. >> >> 127.0.0.1 - - [09/июл/11:00:48:22 +0400] "GET /examples/ HTTP/1.1" 200 1156 > > Oha, getting fun here: I checked 7.0.16 (before the ALV change) with > default locale th_TH_TH, which changes about everything, including digits. > > That will produce > > - english months > > - thai digits in request timestamp, but also in the default > file suffix timestamp (rendered here as "?", so effectively > breaking file rotation - but only since that locale is not fully > available here). > > I suggest we at least make the behaviour consistent: > > - Change the defaults to en_US
I think it has to be en_US. The javadoc of AccessLogValve says: %t - Date and time, in Common Log Format format I think that Common Log Format expects English months and digits. http://httpd.apache.org/docs/current/logs.html#accesslog > - Allow to overwrite the locale used for formatting the lines in > the access log *and also* the file sufix Maybe, but I think that nobody asked. There is another enhancement on todo list: provide "encoding" option for AccessLogValve, like already done for FileHandler in JULI. > > Unfortunately I could find only one reference, that en_US support is > mandatory for a JVM: > > http://java.sun.com/developer/technicalArticles/J2SE/locale/ > > Look for "This list is quite short: English (U.S.)." > > If we wanted to make it bullet-proof, we could either switch to the > default locale completely, but that changes behaviour quite a lot as you > noticed, or use DateFormatSymbols to just fix the month names. That > would be the old behaviour with inconsistent formatting. > > I suggest we use en_US if available, otherwise the default locale. In > any case make it overwritable by an attribute. That would give > consistent behaviour, which on most installations should be as good or > even better than before. > Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org