Summary: | SysLogAppender is not logging header of the layout | ||
---|---|---|---|
Product: | Log4j - Now in Jira | Reporter: | Aparna <aparna.mokkapati> |
Component: | Appender | Assignee: | log4j-dev <log4j-dev> |
Status: | RESOLVED FIXED | ||
Severity: | critical | CC: | grandhisiri |
Priority: | P1 | ||
Version: | 1.2 | ||
Target Milestone: | --- | ||
Hardware: | Other | ||
OS: | Windows XP |
Description
Aparna
2006-08-02 10:43:05 UTC
Do you think that the layout header should be written once at the appender initialization, once at the first processed log request or once per log request? Should the footer be written once when the appender is closed or once per log request? SyslogAppender should be similar to other appenders in logging the header and footer.So I think that header should be logged once at the first processed log request and footer once when the appender is closed. In case of reloading(change)the properties or config file,Logging of headers and footers should be similar to other appenders SysLogAppender now is a subclass of WriterAppender and behaves the same as other appenders writing the footer and header at activation and closing. This is checked into SVN trunk, pending for 1.3 Committed by Elias against log4j/trunk in rev 500749. Changing the base class of an established appender is a pretty significant architectural change for such a small enhancement and would have benefitted from prior discussion. I would be very reluctant to make such a change in log4j 1.2.x and the 1.3 patch should be reviewed. I think it is likely that the rebasing of the class may have introduced behavioral changes (buffering, encoding, etc) in addition to the desired change. Committed minor tweak to SyslogAppender in log4j 1.2 branch on rev 510695 to address this issue. Header will be emitted on either call to activateOptions() or first handled logging event, footer will be sent on close if initialization got to either of those points. |