Bug 41040 - SyslogAppender should prefix message with TIMESTAMP and local hostname
Summary: SyslogAppender should prefix message with TIMESTAMP and local hostname
Alias: None
Product: Log4j - Now in Jira
Classification: Unclassified
Component: Appender (show other bugs)
Version: 1.2
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: log4j-dev
Depends on:
Reported: 2006-11-25 16:15 UTC by Gunter Zeilinger
Modified: 2007-02-22 13:45 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Gunter Zeilinger 2006-11-25 16:15:53 UTC
Comment 1 Gunter Zeilinger 2006-11-25 16:32:16 UTC
SyslogAppender of 1.2.14 only prefix the PRI part, but not the HEADER part of a
syslog message according RFC 3164.
The problem is aready fixed at the trunc (1.3). Please backport this fix to the
1.2 branch.

Comment 2 Curt Arnold 2007-02-22 10:19:15 UTC
I don't think we can change the default behavior as it has been out there so long that people may have 
designed LayoutPatterns to provide the missing timestamp and hostname and could be disrupted if we 
changed the behavior.

However, it does seem like we should add a header property (that is what the combination of timestamp 
and host name are called in the RFC) with a default value of false that when enabled resulted in the 
appender providing the timestamp and host name.

There is another syslog appender issue involving headers/footers and will have to review to make sure 
that both can be addressed without conflicting over the "header" name.
Comment 3 Curt Arnold 2007-02-22 13:45:28 UTC
Committed rev 510660 to v 1.2 branch.

Appreciate any feedback.  Reopen if unsatisfactory.