Log4J input question about Map

I see at https://www.elastic.co/guide/en/logstash/current/plugins-inputs-log4j.html, "if the original log4j LoggingEvent contains MDC hash entries, they will be merged in the event as fields.". I want to take advantage of this but I don't know how. Our normal log4j use involves:

Logger logger =  LoggerFactory.getLogger(MyClass.getName());
logger.error("Some message", someException);

I see the LoggingEvent constructor that takes the Map and also its setProperty method but as the Logger method(s) are void (not returning the LoggingEvent), how are they intended to be called? I've been googling in circles for the past hour so I'm hoping someone here has done this already.