[
https://issues.apache.org/jira/browse/LOG4J2-1904?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16006020#comment-16006020
]
tsimba kely commented on LOG4J2-1904:
-------------------------------------
for that , you should write an custom pattern layout(same as patternLayout) but
take a facility as attribute, and inject the facility in the buffer before all
append Log. I'll doing to resolve this problem of syslog Layout. if you want, I
can give you my custom layout
> facility setted to syslogappendar don't work,but user facility is being used.
> -----------------------------------------------------------------------------
>
> Key: LOG4J2-1904
> URL: https://issues.apache.org/jira/browse/LOG4J2-1904
> Project: Log4j 2
> Issue Type: Question
> Components: Layouts
> Affects Versions: 2.8.2
> Reporter: clonline
>
> Hello
> The following is my settings.
> {code}
> <Syslog name="SYSLOG" host="127.0.0.1" port="514" protocol="UDP"
> facility="LOCAL6">
> <PatternLayout pattern=" %d{DEFAULT} %5p - %m%n"/>
> </Syslog>
> {code}
> But the facility received by rsyslog is not LOCAL6 and is USER.
> The jars that I am using
> * commons-logging-1.1.1.jar
> * log4j-jcl-2.8.2.jar
> * log4j-core-2.8.2.jar
> * log4j-api-2.8.2.jar
> Thanks for any answers.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)