<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN" shutdownHook="disable">
    <Appenders>
        <Queue name="ServerGuiConsole">
            <PatternLayout pattern="[%d{HH:mm:ss} %level]: %msg{nolookups}%n" />
        </Queue>
        <TerminalConsole name="TerminalConsole">
            <PatternLayout>
                <LoggerNamePatternSelector defaultPattern="%highlightError{[%d{HH:mm:ss} %level]: [%logger] %msg%n%xEx{full}}">
                    <!-- Log root, Minecraft, Mojang and Bukkit loggers without prefix -->
                    <!-- Disable prefix for various plugins that bypass the plugin logger -->
                    <PatternMatch key=",net.minecraft.,Minecraft,com.mojang.,com.sk89q.,ru.tehkode.,Minecraft.AWE"
                                  pattern="%highlightError{[%d{HH:mm:ss} %level]: %msg%n%xEx{full}}" />
                </LoggerNamePatternSelector>
            </PatternLayout>
        </TerminalConsole>
        <RollingRandomAccessFile name="File" fileName="logs/latest.log" filePattern="logs/%d{yyyy-MM-dd}-%i.log.gz">
            <PatternLayout>
                <LoggerNamePatternSelector defaultPattern="[%d{HH:mm:ss}] [%t/%level]: [%logger] %stripAnsi{%msg}%n%xEx{full}">
                    <!-- Log root, Minecraft, Mojang and Bukkit loggers without prefix -->
                    <!-- Disable prefix for various plugins that bypass the plugin logger -->
                    <PatternMatch key=",net.minecraft.,Minecraft,com.mojang.,com.sk89q.,ru.tehkode.,Minecraft.AWE"
                                  pattern="[%d{HH:mm:ss}] [%t/%level]: %stripAnsi{%msg}%n%xEx{full}" />
                </LoggerNamePatternSelector>
            </PatternLayout>
            <Policies>
                <TimeBasedTriggeringPolicy />
                <OnStartupTriggeringPolicy />
            </Policies>
            <DefaultRolloverStrategy max="1000"/>
        </RollingRandomAccessFile>
        <Async name="Async">
            <AppenderRef ref="rewrite"/>
        </Async>
        <Rewrite name="rewrite">
            <StacktraceDeobfuscatingRewritePolicy />
            <AppenderRef ref="rewrite2"/>
        </Rewrite>
        <Rewrite name="rewrite2">
            <ExtraClassInfoRewritePolicy />
            <AppenderRef ref="File"/>
            <AppenderRef ref="TerminalConsole" level="info"/>
            <AppenderRef ref="ServerGuiConsole" level="info"/>
        </Rewrite>
    </Appenders>
    <Loggers>
        <Root level="info">
            <filters>
                <MarkerFilter marker="NETWORK_PACKETS" onMatch="DENY" onMismatch="NEUTRAL" />
            </filters>
            <AppenderRef ref="Async"/>
        </Root>
    </Loggers>
</Configuration>
