<?xml version="1.0" encoding="UTF-8"?>
<!--
    If this file was named log4j2.xml then it would automatically be applied
    But, Minecraft has their own which causes the game to break if we try to use ours
    So ours is enabled in the code (or more specifically, the JarMain)
-->

<Configuration status="WARN">
    <Appenders>
        <Console name="console" target="SYSTEM_OUT">
            <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
        </Console>

        <File name="all_logs_file" fileName="logs/all.log">
            <PatternLayout>
                <pattern>%d %p %c{1.} [%t] %m%n</pattern>
            </PatternLayout>
        </File>

        <File name="important_logs_file" fileName="logs/important.log">
            <Filters>
                <ThresholdFilter level="warn" onMatch="ACCEPT" onMismatch="DENY"/>
            </Filters>
            <PatternLayout>
                <pattern>%d %p %c{1.} [%t] %m%n</pattern>
            </PatternLayout>
        </File>
    </Appenders>
    <Loggers>
        <Root level="debug">
            <AppenderRef ref="console"/>
            <AppenderRef ref="all_logs_file"/>
            <AppenderRef ref="important_logs_file"/>
        </Root>
    </Loggers>
</Configuration>