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 "Gareth Western (JIRA)" <ji...@apache.org> on 2015/06/10 14:30:01 UTC
[jira] [Issue Comment Deleted] (LOG4J2-355) Add support for
multiple SD-ELEMENTs in a RFC 5424 syslog message
[ https://issues.apache.org/jira/browse/LOG4J2-355?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gareth Western updated LOG4J2-355:
----------------------------------
Comment: was deleted
(was: [~btibi] Could you provide an example of using the LoggerFields with the Syslog appender? I can't get it to work using the following log4j2.xml:
{code}
<?xml version="1.0" encoding="UTF-8"?>
<Configuration name="TestConfig" packages="com.garethwestern" monitorInterval="30">
<Appenders>
<Syslog name="gareth"
host="localhost"
port="514"
protocol="UDP"
facility="LOCAL4"
format="RFC5424"">
<LoggerFields>
<KeyValuePair key="thread" value="%t"/>
<KeyValuePair key="priority" value="%p"/>
<KeyValuePair key="category" value="%c"/>
</LoggerFields>
</Syslog>
</Appenders>
<Loggers>
<Logger name="com.garethwestern" level="debug"/>
<Root level="warn">
<AppenderRef ref="gareth"/>
</Root>
</Loggers>
</Configuration>
{code}
But the messsages appear in my syslog without any pattern. For example:
{code}LOGGER.info("Finished");{code}
appears as
{code}Jun 10 23:09:05 quine TestConfig finished{code})
> Add support for multiple SD-ELEMENTs in a RFC 5424 syslog message
> -----------------------------------------------------------------
>
> Key: LOG4J2-355
> URL: https://issues.apache.org/jira/browse/LOG4J2-355
> Project: Log4j 2
> Issue Type: Improvement
> Components: Core
> Affects Versions: 2.0-beta9
> Reporter: Tibor Benke
> Fix For: 2.0-beta9
>
> Attachments: LOG4J2-355_v2.patch, LOG4J2-355_v3.patch, LOG4J2-355_v4.patch, add_multime_SD_ELEMENT_support.diff, eventPrefix_behaviour_demo_testcase.patch
>
>
> The patch contains the modifications to support the feature and I also refactored some code in the RFC5424Layout.java file.
--
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