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
_______________________________________________
Logback-user mailing list
[email protected]
http://mailman.qos.ch/mailman/listinfo/logback-user