vy commented on issue #1674:
URL: 
https://github.com/apache/logging-log4j2/issues/1674#issuecomment-1681207387

   Hey @fractal3000!
   
   _[As indicated in [the Log4j support 
policy](https://logging.apache.org/log4j/2.x/support.html#discussions), please 
use `[email protected]` for questions next time.]_
   
   Your configuration works just fine for me. My test `log4j2.xml`:
   
   ```
   <?xml version="1.0" encoding="UTF-8"?>
   <Configuration status="OFF">
     <Appenders>
       <Syslog name="syslog" format="RFC5424" host="127.0.0.1" port="51400" 
protocol="UDP" newLine="true" includeMDC="true">
         <LoggerFields>
           <KeyValuePair key="thread" value="%t"/>
           <KeyValuePair key="priority" value="%p"/>
           <KeyValuePair key="category" value="%c"/>
           <KeyValuePair key="exception" value="%ex{full}"/>
         </LoggerFields>
       </Syslog>
     </Appenders>
     <Loggers>
       <Root level="trace">
         <appender-ref ref="syslog"/>
       </Root>
     </Loggers>
   </Configuration>
   ```
   
   And my `nc` output:
   
   ```
   $ nc -v -u -l 51400
   Bound on 0.0.0.0 51400
   Connection received on localhost 50429
   <134>1 2023-08-16T22:06:03.290+02:00 tahta 
/home/vy/Projects/log4j/2/log4j-layout-template-json-test/target/test-classes/syslog.xml
 845631 - [mdc@32473 
category="org.apache.logging.log4j.layout.template.json.SyslogTest" 
exception="" priority="INFO" thread="main"] foo
   <134>1 2023-08-16T22:06:03.296+02:00 tahta 
/home/vy/Projects/log4j/2/log4j-layout-template-json-test/target/test-classes/syslog.xml
 845631 - [mdc@32473 
category="org.apache.logging.log4j.layout.template.json.SyslogTest" 
exception="" priority="INFO" thread="main"] bar
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to