Bug 1096053 - [GSS] (6.3.0) SyslogHandler doesn't handle multi-byte characters correctly
Summary: [GSS] (6.3.0) SyslogHandler doesn't handle multi-byte characters correctly
Status: VERIFIED
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Logging
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: DR2
: EAP 6.4.0
Assignee: James Perkins
QA Contact: Nikoleta Ziakova
Lucas Costi
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-09 07:34 UTC by Osamu Nagano
Modified: 2018-12-07 22:33 UTC (History)
1 user (show)

(edit)
In previous versions of JBoss EAP 6, using `org.jboss.logmanager.handlers.SyslogHandler` to log multi-byte characters may result in corrupted output recorded in the log. For example:

----
Mar  8 17:29:09 UNKNOWN_HOSTNAME java[9896]: SyslogHandler: ????????????
----

This issue has been resolved in this release and now characters are output to the log as expected.
Clone Of:
(edit)
Last Closed:


Attachments (Terms of Use)
utf8mb4log.war (27.31 KB, application/zip)
2014-05-09 07:34 UTC, Osamu Nagano
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker LOGMGR-104 Major Resolved SyslogHandler doesn't handle multi-byte characters correctly 2015-11-02 17:23 UTC
Red Hat Bugzilla 1140417 None None None Never

Internal Trackers: 1140417

Description Osamu Nagano 2014-05-09 07:34:44 UTC
Created attachment 893868 [details]
utf8mb4log.war

Description of problem:
I tried to log multi-byte message with both of org.jboss.logmanager.handlers.SyslogHandler and org.apache.log4j.net.SyslogAppender for same message, only SyslogHandler output were corrupted.


Steps to Reproduce:
The same as described in LOGMGR-104.  I attached the war file for convenience.
1. Configure syslog handler for category "utf8mb4log.LoggingServlet".
2. Deploy the app, utf8mb4log.war
3. Access the servlet, curl 'http://localhost:8080/utf8mb4log/'


Actual results:
Some of log messages in /var/log/messages are corrupted like https://issues.jboss.org/secure/attachment/12381063/corrupted.png


Expected results:
Exactly the same log messages should be printed in /var/log/messages as well as server.log, like https://issues.jboss.org/secure/attachment/12381065/corrupted3.png


Additional info:
Some messages may not be printed well in your terminal because of lack of font.

Comment 6 James Perkins 2014-09-11 15:40:59 UTC
Log manager updated which fixes this issue.

Comment 7 Nikoleta Ziakova 2014-09-25 14:38:09 UTC
Using the provided reproducer:
(1) EAP 6.3.0.GA:
Sep 25 16:30:25 - java[1048] 2-byte char: À
Sep 25 16:30:25 - java[1048] 3-byte char: ���
Sep 25 16:30:25 - java[1048] 4-byte char: ����ٖ

(2) EAP 6.4.0.DR2:
Sep 25 16:35:01 - java[10707] 2-byte char: À
Sep 25 16:35:01 - java[10707] 3-byte char: あ
Sep 25 16:35:01 - java[10707] 4-byte char: 


Note You need to log in before you can comment on or make changes to this bug.