The SyslogAppender assumes each line of output starts with a tab and replaces it with spaces. If the line doesn't start with a tab, the first character of the line is lost. If the line is empty, the appender will get an exception. The patch to fix this problem is: *** SyslogAppender.java.orig Wed Sep 13 15:53:09 2006 --- SyslogAppender.java Wed Sep 13 15:53:05 2006 *************** *** 260,266 **** if(len > 0) { sqw.write(s[0]); for(int i = 1; i < len; i++) { ! sqw.write(TAB+s[i].substring(1)); } } } --- 260,274 ---- if(len > 0) { sqw.write(s[0]); for(int i = 1; i < len; i++) { ! if (s[i].length() > 0) { ! if (s[i].charAt(0) == '\t') { ! sqw.write(TAB+s[i].substring(1)); ! } else { ! sqw.write(TAB+s[i]); ! } ! } else { ! sqw.write(s[i]); ! } } } }
Do you have this problem in 1.2.14 also?
Bug is in 1.2.14, SyslogAppenderTest.testBadTabbing will throw an exception without code fix. Committed against 1.2 branch in rev 510307. Corresponding code in trunk has been commented out earlier.