You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2008/11/20 20:18:56 UTC

DO NOT REPLY [Bug 46252] New: Tomcat access log doesn't support Unicode

https://issues.apache.org/bugzilla/show_bug.cgi?id=46252

           Summary: Tomcat access log doesn't support Unicode
           Product: Tomcat 5
           Version: 5.5.17
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: adam_polomski@symantec.com


AccessLogValve, which is responsible for handling the access log uses
FileWriter (that doesn't support Unicode). I guess that instantiating the
writer like this would solve the case:

writer = new PrintWriter(new OutputStreamWriter(new FileOutputStream(pathname),
"UTF-8"), true);


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 46252] Tomcat access log doesn't support Unicode

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46252


Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement




--- Comment #1 from Mark Thomas <ma...@apache.org>  2009-04-16 14:38:59 PST ---
I am curious as to which elements you are trying to log that require UTF-8.
Most will be ISO-8859-1. The only exceptions I can think of are user name and
session attribute values.

I am concerned that whilst an access log is typically configured at the host
level the user name encoding can vary from request to request (if you are using
FORM) and session attributes are under no obligation to use a single consistent
encoding. Therefore, it would be rather difficult to ensure the correct logging
of each of these elements.

Given the above I am not in favour of using UTF-8 by default.

However, I can see the potential of making the encoding configurable with the
default being the current behaviour. Therefore, I am marking this as an
enhancement.

Patches are always very welcome and if you are interested in writing such a
patch and need any assistance feel free to ask on the dev list.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 46252] Tomcat access log doesn't support Unicode

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46252

--- Comment #3 from Konstantin Kolinko <kn...@gmail.com> 2011-07-11 16:01:05 UTC ---
Created attachment 27278
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=27278
2011-07-11_tc6_bug46252.patch

Correction: that revision number above was r1145200

Here is patch that will be proposed for Tomcat 6.
Backport to Tomcat 5.5 is unlikely.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 46252] Tomcat access log doesn't support Unicode

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46252

--- Comment #2 from Konstantin Kolinko <kn...@gmail.com> 2011-07-11 15:16:40 UTC ---
Implemented in 7.0 with r11145200 and will be in 7.0.19.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 46252] Tomcat access log doesn't support Unicode

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46252

Konstantin Kolinko <kn...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #27278|0                           |1
        is obsolete|                            |

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 46252] Tomcat access log doesn't support Unicode

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46252

--- Comment #4 from Konstantin Kolinko <kn...@gmail.com> 2011-07-11 17:03:05 UTC ---
Created attachment 27279
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=27279
2011-07-11_tc6_bug46252_v2.patch

Updated patch: added r1145237

This adds
in AccessLogValve:
- i18n for messages
- Log a failure if access log file cannot be opened.
- Autocreate directory if it is specified as a part of the file name
in FileHandler:
- Autocreate directory if it is specified as a part of the file name

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 46252] Tomcat access log doesn't support Unicode

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46252

Konstantin Kolinko <kn...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #6 from Konstantin Kolinko <kn...@gmail.com> 2011-07-21 10:26:33 UTC ---
Fixed in 6.0 with r1149099 and will be in 6.0.33.
I won't backport these changes to 5.5.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 46252] Tomcat access log doesn't support Unicode

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46252

--- Comment #5 from Konstantin Kolinko <kn...@gmail.com> 2011-07-11 18:17:32 UTC ---
Created attachment 27280
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=27280
2011-07-11_tc6_bug46252_JMX.patch

Additional patch:
Expose the new "encoding" option through JMX.
I also fixed wrong mapping for "getEnabled()".

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org