@@ -0,0 +1,2107 @@
+package com.github.games647.colorconsole.common;%0A%0Aimport java.io.Serializable;%0Aimport java.lang.reflect.Field;%0Aimport java.lang.reflect.Method;%0Aimport java.nio.charset.Charset;%0A%0Aimport org.apache.logging.log4j.LogManager;%0Aimport org.apache.logging.log4j.core.Appender;%0Aimport org.apache.logging.log4j.core.Layout;%0Aimport org.apache.logging.log4j.core.LoggerContext;%0Aimport org.apache.logging.log4j.core.config.Configuration;%0Aimport org.apache.logging.log4j.core.config.DefaultConfiguration;%0Aimport org.apache.logging.log4j.core.layout.PatternLayout;%0Aimport org.apache.logging.log4j.core.pattern.RegexReplacement;%0A%0Apublic class CommonLogInstaller %7B%0A%0A    public static PatternLayout createLayout(String logFormat) throws ReflectiveOperationException %7B%0A        try %7B%0A            Method builder = PatternLayout.class%0A                    .getDeclaredMethod(%22createLayout%22, String.class, Configuration.class, RegexReplacement.class%0A                            , String.class, String.class);%0A%0A            return (PatternLayout) builder.invoke(null, logFormat, new DefaultConfiguration(), null%0A                    , Charset.defaultCharset().name(), %22true%22);%0A        %7D catch (NoSuchMethodException methodEx) %7B%0A            return PatternLayout.newBuilder()%0A                    .withCharset(Charset.defaultCharset())%0A                    .withPattern(logFormat)%0A                    .withConfiguration(new DefaultConfiguration())%0A                    .withAlwaysWriteExceptions(true)%0A                    .build();%0A        %7D%0A    %7D%0A%0A    public static void setLayout(Layout%3C? extends Serializable%3E layout, Appender terminalAppender)%0A            throws ReflectiveOperationException %7B%0A        Field field = terminalAppender.getClass().getSuperclass().getDeclaredField(%22layout%22);%0A        field.setAccessible(true);%0A        field.set(terminalAppender, layout);%0A    %7D%0A%0A    public static Appender getTerminalAppender(String terminalName) %7B%0A        LoggerContext ctx = (LoggerContext) LogManager.getContext(false);%0A        Configuration conf = ctx.getConfiguration();%0A%0A        return conf.getAppenders().get(terminalName);%0A    %7D%0A%7D%0A

Add missing files