// Path: src/java/com/spinn3r/log5j/InternalLogger.java
// public interface InternalLogger {
//     boolean isEnabled(LogLevel level);
// 
//     void log(LogEvent event);
// }
// 
// Path: src/java/com/spinn3r/log5j/InternalLoggerFactory.java
// public interface InternalLoggerFactory {
//     InternalLogger create(String logName);
// 
//     void shutdown();
// }
// 
// Path: src/java/com/spinn3r/log5j/LogEvent.java
// public class LogEvent {
//     private static ThreadLocal<MessageFormatter> __tlMessageFormatter =
//             new ThreadLocal<MessageFormatter>() {
//                 @Override
//                 protected MessageFormatter initialValue() {
//                     return LogManager.__messageFormatterFactory.create();
//                 }
//             };
// 
//     private final InternalLogger _internalLogger;
// 
//     private final long _time;
// 
//     private final Marker _marker;
// 
//     private final String _threadName;
// 
//     private final String _logName;
// 
//     private final LogLevel _level;
// 
//     private final String _formatMessage;
// 
//     private final Object[] _params;
// 
//     private final Throwable _throwable;
// 
//     private LogEvent(String threadName,
//                      InternalLogger internalLogger,
//                      @Nullable Marker marker,
//                      String logName,
//                      LogLevel level,
//                      String formatMessage,
//                      Object[] params,
//                      Throwable throwable) {
//         _time = System.currentTimeMillis();
//         _marker = marker;
//         _threadName = threadName;
//         _internalLogger = internalLogger;
//         _logName = logName;
//         _level = level;
//         _formatMessage = formatMessage;
//         _params = params;
//         _throwable = throwable;
//     }
// 
//     public long time() {
//         return _time;
//     }
// 
//     public String threadName() {
//         return _threadName;
//     }
// 
//     protected InternalLogger logger() {
//         return _internalLogger;
//     }
// 
//     public Marker marker() {
//         return _marker;
//     }
// 
//     public String logName() {
//         return _logName;
//     }
// 
//     public LogLevel level() {
//         return _level;
//     }
// 
//     public String formatMessage() {
//         return _formatMessage;
//     }
// 
//     public Object[] params() {
//         return _params;
//     }
// 
//     public Throwable throwable() {
//         return _throwable;
//     }
// 
//     public String message() {
//         if (_params == null || _params.length == 0) {
//             return _formatMessage;
//         } else {
//             return __tlMessageFormatter.get().format(_formatMessage, _params);
//         }
//     }
// 
//     @Override
//     public String toString() {
//         return "LogEvent{" +
//                 "time=" + _time +
//                 ", marker='" + _marker + '\'' +
//                 ", threadName='" + _threadName + '\'' +
//                 ", level=" + _level +
//                 ", formatMessage='" + _formatMessage + '\'' +
//                 ", params=" + (_params == null ? null : Arrays.asList(_params)) +
//                 ", throwable=" + _throwable +
//                 '}';
//     }
// 
//     public static LogEvent create(InternalLogger internalLogger, @Nullable Marker marker, String logName,
//             LogLevel level, String message) {
//         return create(internalLogger, marker, logName, level, message, null, null);
//     }
// 
//     public static LogEvent create(InternalLogger internalLogger, @Nullable Marker marker, String logName,
//             LogLevel level, String message, Throwable throwable) {
//         return create(internalLogger, marker, logName, level, message, null, throwable);
//     }
// 
//     public static LogEvent create(InternalLogger internalLogger, @Nullable Marker marker, String logName,
//             LogLevel level, String message, Object[] params) {
//         return create(internalLogger, marker, logName, level, message, params, null);
//     }
// 
//     public static LogEvent create(InternalLogger internalLogger, @Nullable Marker marker, String logName,
//             LogLevel level, String message, Object[] params, Throwable throwable) {
//         String threadName = Thread.currentThread().getName();
//         return create(threadName, internalLogger, marker, logName, level, message,
//                 params, throwable);
//     }
// 
//     public static LogEvent create(
//             String threadName,
//             InternalLogger internalLogger,
//             @Nullable Marker marker,
//             String logName,
//             LogLevel level,
//             String formatMessage,
//             Object[] params,
//             Throwable throwable) {
//         return new LogEvent(threadName, internalLogger, marker, logName, level,
//                 formatMessage, params, throwable);
//     }
// }
// 
// Path: src/java/com/spinn3r/log5j/LogLevel.java
// public enum LogLevel {
//     TRACE, DEBUG, INFO, WARN, ERROR, FATAL,;
// }


import com.spinn3r.log5j.InternalLogger;
import com.spinn3r.log5j.InternalLoggerFactory;
import com.spinn3r.log5j.LogEvent;
import com.spinn3r.log5j.LogLevel;
import org.apache.log4j.*;
import org.apache.log4j.spi.LoggingEvent;
import java.util.EnumMap;
            }

            public void log(LogEvent event) {
                Throwable t = event.throwable();
                LoggingEvent loggingEvent = new InternalLoggingEvent(logger,
                                                                     event.threadName(),
                                                                     event.time(),
                                                                     toLog4JLevel(event.level()),
                                                                     event.message(),
                                                                     t);
                logger.callAppenders(loggingEvent);
            }
        };
    }

    public void shutdown() {
        LogManager.shutdown();
    }

    private Level toLog4JLevel(LogLevel level) {
        return __levelMapping.get(level);
    }

    static class InternalLoggingEvent extends LoggingEvent {
        private final String _threadName;

        InternalLoggingEvent(Category category,
                             String threadName,
                             long eventTime,
                             Priority priority,
// Path: src/java/com/spinn3r/log5j/InternalLogger.java
// public interface InternalLogger {
//     boolean isEnabled(LogLevel level);
// 
//     void log(LogEvent event);
// }
// 
// Path: src/java/com/spinn3r/log5j/InternalLoggerFactory.java
// public interface InternalLoggerFactory {
//     InternalLogger create(String logName);
// 
//     void shutdown();
// }
// 
// Path: src/java/com/spinn3r/log5j/LogEvent.java
// public class LogEvent {
//     private static ThreadLocal<MessageFormatter> __tlMessageFormatter =
//             new ThreadLocal<MessageFormatter>() {
//                 @Override
//                 protected MessageFormatter initialValue() {
//                     return LogManager.__messageFormatterFactory.create();
//                 }
//             };
// 
//     private final InternalLogger _internalLogger;
// 
//     private final long _time;
// 
//     private final Marker _marker;
// 
//     private final String _threadName;
// 
//     private final String _logName;
// 
//     private final LogLevel _level;
// 
//     private final String _formatMessage;
// 
//     private final Object[] _params;
// 
//     private final Throwable _throwable;
// 
//     private LogEvent(String threadName,
//                      InternalLogger internalLogger,
//                      @Nullable Marker marker,
//                      String logName,
//                      LogLevel level,
//                      String formatMessage,
//                      Object[] params,
//                      Throwable throwable) {
//         _time = System.currentTimeMillis();
//         _marker = marker;
//         _threadName = threadName;
//         _internalLogger = internalLogger;
//         _logName = logName;
//         _level = level;
//         _formatMessage = formatMessage;
//         _params = params;
//         _throwable = throwable;
//     }
// 
//     public long time() {
//         return _time;
//     }
// 
//     public String threadName() {
//         return _threadName;
//     }
// 
//     protected InternalLogger logger() {
//         return _internalLogger;
//     }
// 
//     public Marker marker() {
//         return _marker;
//     }
// 
//     public String logName() {
//         return _logName;
//     }
// 
//     public LogLevel level() {
//         return _level;
//     }
// 
//     public String formatMessage() {
//         return _formatMessage;
//     }
// 
//     public Object[] params() {
//         return _params;
//     }
// 
//     public Throwable throwable() {
//         return _throwable;
//     }
// 
//     public String message() {
//         if (_params == null || _params.length == 0) {
//             return _formatMessage;
//         } else {
//             return __tlMessageFormatter.get().format(_formatMessage, _params);
//         }
//     }
// 
//     @Override
//     public String toString() {
//         return "LogEvent{" +
//                 "time=" + _time +
//                 ", marker='" + _marker + '\'' +
//                 ", threadName='" + _threadName + '\'' +
//                 ", level=" + _level +
//                 ", formatMessage='" + _formatMessage + '\'' +
//                 ", params=" + (_params == null ? null : Arrays.asList(_params)) +
//                 ", throwable=" + _throwable +
//                 '}';
//     }
// 
//     public static LogEvent create(InternalLogger internalLogger, @Nullable Marker marker, String logName,
//             LogLevel level, String message) {
//         return create(internalLogger, marker, logName, level, message, null, null);
//     }
// 
//     public static LogEvent create(InternalLogger internalLogger, @Nullable Marker marker, String logName,
//             LogLevel level, String message, Throwable throwable) {
//         return create(internalLogger, marker, logName, level, message, null, throwable);
//     }
// 
//     public static LogEvent create(InternalLogger internalLogger, @Nullable Marker marker, String logName,
//             LogLevel level, String message, Object[] params) {
//         return create(internalLogger, marker, logName, level, message, params, null);
//     }
// 
//     public static LogEvent create(InternalLogger internalLogger, @Nullable Marker marker, String logName,
//             LogLevel level, String message, Object[] params, Throwable throwable) {
//         String threadName = Thread.currentThread().getName();
//         return create(threadName, internalLogger, marker, logName, level, message,
//                 params, throwable);
//     }
// 
//     public static LogEvent create(
//             String threadName,
//             InternalLogger internalLogger,
//             @Nullable Marker marker,
//             String logName,
//             LogLevel level,
//             String formatMessage,
//             Object[] params,
//             Throwable throwable) {
//         return new LogEvent(threadName, internalLogger, marker, logName, level,
//                 formatMessage, params, throwable);
//     }
// }
// 
// Path: src/java/com/spinn3r/log5j/LogLevel.java
// public enum LogLevel {
//     TRACE, DEBUG, INFO, WARN, ERROR, FATAL,;
// }


// Path: src/java/com/spinn3r/log5j/factories/Log4jInternalLoggerFactory.java
import com.spinn3r.log5j.InternalLogger;
import com.spinn3r.log5j.InternalLoggerFactory;
import com.spinn3r.log5j.LogEvent;
import com.spinn3r.log5j.LogLevel;
import org.apache.log4j.*;
import org.apache.log4j.spi.LoggingEvent;
import java.util.EnumMap;

            }

            public void log(LogEvent event) {
                Throwable t = event.throwable();
                LoggingEvent loggingEvent = new InternalLoggingEvent(logger,
                                                                     event.threadName(),
                                                                     event.time(),
                                                                     toLog4JLevel(event.level()),
                                                                     event.message(),
                                                                     t);
                logger.callAppenders(loggingEvent);
            }
        };
    }

    public void shutdown() {
        LogManager.shutdown();
    }

    private Level toLog4JLevel(LogLevel level) {
        return __levelMapping.get(level);
    }

    static class InternalLoggingEvent extends LoggingEvent {
        private final String _threadName;

        InternalLoggingEvent(Category category,
                             String threadName,
                             long eventTime,
                             Priority priority,
                             Object o,