Bug 42087

Summary: log4j.appender.syslog does not limit syslog lines to 1024 chars
Product: Log4j - Now in Jira Reporter: Holger <holgi80>
Component: AppenderAssignee: log4j-dev <log4j-dev>
Status: RESOLVED FIXED    
Severity: major    
Priority: P2    
Version: 1.2   
Target Milestone: ---   
Hardware: Other   
OS: other   

Description Holger 2007-04-11 04:03:54 UTC
logging-log4j-1.2.14.tar.gz

according to RFC 3164, the total length of the packet must be 1024 bytes or less.
When you log lines longer than this with the syslog appender, the trailing chars
are lost. I would see this as major bug because of data loss.
Comment 1 Curt Arnold 2007-04-21 00:13:13 UTC
Committed change in rev 530990.  

If character count on message exceeds 256, then byte count is checked and
message is successively halved with added "..." until each packet is less than
1024 bytes.

Added SyslogAppenderTest.testBigPackets to confirm that message is properly split.
Comment 2 Curt Arnold 2007-04-21 08:28:27 UTC
Made another modification in rev 531049.  I hadn't allowed for the 3-5
characters in the PRI section that would be added later when checking if total
package would exceed 1024 bytes.  Also simplified "fixed" part of continuations
and no longer include the facility name.  Changed behavior is consistent with
stack traces which do not repeat the facility name either.