You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Paul D Johe (JIRA)" <ji...@apache.org> on 2015/03/05 11:47:38 UTC

[jira] [Commented] (LOG4J2-256) Support custom format using patterns in SyslogLayout

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

Paul D Johe commented on LOG4J2-256:
------------------------------------

I disagree that the best solution would be to add support for the "LoggerFields" to the SyslogLayout (BSD format). Doing so would make the relatively simple BSD format more complicated than needed.

The RFC5424 layout and BSD layout (SyslogLayout) are two very different layouts and should not be lumped too much (see LOG4J2-969).

If a "pattern" @PluginAttribute was added in to SyslogAppender, the attribute can only apply for the BSD format...

> Support custom format using patterns in SyslogLayout
> ----------------------------------------------------
>
>                 Key: LOG4J2-256
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-256
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: Layouts
>    Affects Versions: 2.0-beta6
>            Reporter: Tomek KaczyƄski
>         Attachments: SyslogWrapLayout.java.patch
>
>
>  It would be nice to be able to appy custom format to a message sent using SyslogLayout, user will be able to use PatternLayout/XMLLayout, etc...  and format it as a syslog message (add syslog header ).
> so the usage would be :
> <SyslogWrapLayout facility="lpr">
> 	<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %marker.%-5level %logger{2.} - %msg"/>
> </SyslogWrapLayout>



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org