
20 Apr
2012
20 Apr
'12
12:13 p.m.
Hi Ceki,
Would you like to post it on this list for future reference?
I created a new discriminator taking the code of MCDBasedDiscriminator and modifying the method getDiscriminatingValue(ILoggingEvent event) as follows. public String getDiscriminatingValue(ILoggingEvent event) { Map<String, String> mdcMap = event.getMDCPropertyMap(); // If the MDC is empty return the default path if (mdcMap.isEmpty()) { return defaultValue; } String parentValue = mdcMap.get("parent"); String nodeValue = mdcMap.get("node"); return parentValue + "/" + nodeValue; } Cheers, Dario