Question

9
Replies
3731
Views
JonathanG0458 Member since 2013 12 posts
Google
Posted: 3 years ago
Last activity: 3 years 7 months ago
Closed
Solved

How to read MDC fields using custom appender

All,

We are trying to implement a custom appender to send our log messages to a log-aggregation tool (ie, Splunk). In order to do this, we had to extend the pega log4j classes and load our custom logging classes into pega.

This part works perfectly, and we are able to send our log messages and associated stack traces to our log aggregator. Our hangup right now is being able to read the values in the MDC hash map that store useful info thats not part of the raw log message (pegathread,userid, requestorid, etc..)

We are trying to read these values by calling the MDC.get() method, however it always returns null values. Is there a different method/function we should be calling to read these MDC values?

Thanks!

-Jon

***Updated by Moderator: Marissa to add SR Details***

Data Integration Java and Activities Data Integration System Administration SR Created
Moderation Team has archived post
Share this page LinkedIn