[ 
https://issues.apache.org/jira/browse/LOG4J2-969?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14742568#comment-14742568
 ] 

rick commented on LOG4J2-969:
-----------------------------

I'm trying to convert from 1.2 and this has been the most pain so far. From my 
view, the "layout" applied to the format of a syslog seems misplaced, coming 
from 1.2.

It seems to me the wrappings for a syslog messages are more a part of a message 
protocol than the layout of a message. Isn't that how 1.2 was? But I can see 
that's not the philosophy here.

The cleanest (maybe hardest) logical solution to me would be allowing nested 
layouts, where one layout could enclose another. Then I could put my pattern 
layout inside the syslog.

My pain is because not only do I have a pattern I must apply to all logging 
(local and syslog/remote) but also use the regex inside to mask credit card 
numbers.



> Refactor SyslogAppender so that Layout is a Plugin element 
> -----------------------------------------------------------
>
>                 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]

Reply via email to