[
https://issues.apache.org/jira/browse/LOG4J2-969?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14734371#comment-14734371
]
Michele Palmia edited comment on LOG4J2-969 at 9/8/15 7:42 AM:
---------------------------------------------------------------
I also need to format the body part of the Syslog message and I'm quite
frustrated by how hard this is to do in Log4j2 (exactly as in the stackoverflow
question mentioned above). Isn't there maybe a way I can apply a layout to the
log message before it gets passed to the syslog appender?
Can you recommend any way to accomplish custom body messages in SyslogAppender,
just through configuration files?
@paul, could you share your custom BsdSyslogLayout?
was (Author: micpalmia):
I also need to format the body part of the Syslog message and I'm quite
frustrated by how hard this is to do in Log4j2 (exactly as in the stackoverflow
question mentioned above). Isn't there maybe a way I can apply a layout to the
log message before it gets passed to the syslog appender?
Can you recommend any way to accomplish custom body messages in SyslogAppender,
just through configuration files?
@paul, could you share your custom BsdLayout?
> Refactor SyslogAppender so that Layout is an PluginElement
> ----------------------------------------------------------
>
> Key: LOG4J2-969
> URL: https://issues.apache.org/jira/browse/LOG4J2-969
> Project: Log4j 2
> Issue Type: Improvement
> Components: Appenders, Layouts
> Affects Versions: 2.2
> Reporter: Paul D Johe
> Labels: syslog, syslogappender
>
> There are quite a lot of attributes to the syslogappender that could have
> been simply included as:
> {code}
> @PluginElement("layout") Layout<? extends Serializable> layout,
> {code}
> This is much more flexible (for example, extension of existing syslog
> layouts) and the field 'format' becomes superfluous, as it is implied by the
> layout chosen (normally SyslogLayout or Rfc5424Layout will be chosen).
> Furthermore, it becomes much clearer which attributes are for the RFC5424
> format and which are for the BSD format.
> Or at least add the possibility for a Layout element, which if does not exist
> will use the existing code.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]