/*
 * Decompiled with CFR 0.152.
 */
package org.apache.logging.log4j.core;

import java.util.EventListener;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.core.LogEvent;
import org.apache.logging.log4j.core.Logger;
import org.apache.logging.log4j.core.LoggerContext;

public class LogEventListener
implements EventListener {
    private final LoggerContext context = (LoggerContext)LogManager.getContext(false);

    protected LogEventListener() {
    }

    public void log(LogEvent event) {
        if (event == null) {
            return;
        }
        Logger logger = this.context.getLogger(event.getLoggerName());
        if (logger.config.filter(event.getLevel(), event.getMarker(), event.getMessage(), event.getThrown())) {
            logger.config.logEvent(event);
        }
    }
}
