DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9285>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9285 SyslogWriter 's bug for multibyte enviroment Summary: SyslogWriter 's bug for multibyte enviroment Product: Log4j Version: unspecified Platform: Sun OS/Version: Solaris Status: NEW Severity: Normal Priority: Other Component: Other AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Hi, I'm using log4j package(Version is 1.2.1) in project. As Happen, when I used SyslogAppender and SyslogWriter for syslogd. Written word is unperfectly to syslogd's "messages" file. This word is so short than I expect that. I thought, it's a enviroment problem with unicode. Because I use log4j on multibyte enviroment. (Spec:Fujitsu Solalis SunBlade 1000) Then, I read log4j package's sources. I detected un-appropiate codes. Next code is referd for "SyslogWriter.java". > public > void write(String string) throws IOException { > DatagramPacket packet = new DatagramPacket(string.getBytes(), > string.length(), > address, SYSLOG_PORT); > > if(this.ds != null) > ds.send(packet); > > } "DatagramPacket()" 's second parameter is "string.length()". But I thought. This suitable code is "string.getBytes().length". -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>