Substantial changes were made to the public API of the SyslogAppender on 2004-11-29 (rev 310971) with the comment "Checnhes to make SyslogAppender RFC 3164 compatible" (sic). There appear to be no discussion of the changes around the time of the commit, but the following messages may be related to the changes, but do not appear to be the direct source of the changes: RFC Complient SyslogAppender, 2003-03-17 http://marc.theaimsgroup.com/?l=log4j-dev&m=104788203427770&w=2 SysLog and SysLog-ng daemon on Solaris, 2003-03-12 http://marc.theaimsgroup.com/?l=log4j-dev&m=104747156207068&w=2 Other messages in the archives contain contributions of a JNI-based SyslogAppender and charset encoding support, but those are outside the scope of this bug, but may be desirable after this bug is complete. Web searching on one of the distinct method names in the 1.3 implementation (facilityStringToint) did not identify any potential source of the implementation. Any information on the motivation and rationale of the changes would be appreciated. The initial commit on this bug is a test case on the v1_2-branch that tests the public API of the SyslogAppender which eventually will be ported to the HEAD as its implementation is modified to be compatible with the 1.2.x API.
Tests committed on v1_2-branch on revision 357884.
Rev 358162 adds the SyslogAppenderTest to the test suite and addresses the API changes identified by the clirr target. There are several issues with the 1.3 implementation that have not been addressed. First, I'm uncertain if the 1.3 implementation was functional. The implementation of activateOptions did not call super.activateOptions() which resulted in any attempted appending to be stopped with AppenderSkeleton's check that the appender had been activated. log4j 1.2's API had a facilityPrinting property that is now supported but is not referenced in the 1.3 code and no obvious place to add equivalent behavior. The 1.3 branch changed the behavior of activateOptions so that a call on an imcompletely configured appender would throw an IllegalStateException. In 1.2, an incomplete configuration would result the ErrorHandler being called on the first log attempt. The testAppenderNoHost test was changed so that it expects the 1.3 behavior. The unit tests exercise the API as much as possible, but do nothing to check that anything ever made it to the syslog in either the 1.2 or 1.3 branches.