MDC is a thread-wide structure. At present time, it cannot be set per logging event. Any changes you make to the mdcPropertyMap (retrieved by calling event.getMDCPropertyMap()) will be visible to all future events generated in the same thread.
public FilterReply decide(ILoggingEvent event) {
if (event.getLevel().isGreaterOrEqual(Level.WARN)) {
MDC.put("demo","demo");
}
return FilterReply.ACCEPT;
}