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
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Logging
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: DR2
: EAP 6.4.0
Assignee: James Perkins
QA Contact: Nikoleta Hlavickova
Lucas Costi
Depends On:
TreeView+ depends on / blocked
Reported: 2014-05-09 07:34 UTC by Osamu Nagano
Modified: 2019-08-19 12:44 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
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:
Last Closed:
Type: Bug

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

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

Internal Links: 1140417

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

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 Hlavickova 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.