Tomcat localhost_access_log.txt encoding

encodinglog-filestomcat7

I run my web-app in Tomcat 7 and in the localhost_access_log.txt file I have the following lines

0:0:0:0:0:0:0:1 - - [25/Jun/2014:10:22:26 +0300] " Ì  Èc£Ï!#ò2Tç¡$EI «àµ«]ëñʯ¯Ù  (ÌÌÀ+À/ À " 400 -
0:0:0:0:0:0:0:1 - - [01/Jan/1970:02:59:59 +0300] "-" 400 -
0:0:0:0:0:0:0:1 - - [01/Jan/1970:02:59:59 +0300] "-" 400 -

My server.xml configuration

<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
               prefix="localhost_access_log." suffix=".txt"
               pattern="%h %l %u %t &quot;%r&quot; %s %b" />

How to change encoding and why the date is incorrect? Thanks

Best Answer

Maybe, if you are under Linux/Unix, it depends on the $LANG, $LC_TIME, and so on, environment variables used during tomcat startup script? Try to check these variables, and also under Windows, try to check your locale.