Hi,
I am trying to add structured data using includeMDC and loggerfields but I
also want MESSAGE-ID passed by the user in the log.
*My current implementation:*
I am passing StructuredDataMessage to logIfEnabled since that is the only
way to pass user defined message-id
- StructuredDataMessage((String)null, msg, messageId)
But I want the structured data picked up from* XML configuration:*
<Syslog name="RFC5424" format="RFC5424" enterpriseNumber=6876
* id="LS" includeMDC="true" mdcId="enterprise"*
mdcIncludes="comp,subcomp">
<LoggerFields>
<KeyValuePair key="level" value="dummy" />
<KeyValuePair key="id" value="dummy" />
</LoggerFields>
As a result my structured data appears twice in the log:
<182>1 2015-08-03T20:28:16.413Z localhost - - USER *[enterprise@6876
level="dummy" id="dummy"][@6876] *This is a dummy log
Any help appreciated.
Thanks,
Priya Ahuja