-
-
Save RoboMWM/f6d389b91210a885ac659f9010e51aa6 to your computer and use it in GitHub Desktop.
Bukkit 1.6 style logging log4j2 configuration (includes thread and log level in console and file) - Note that an update to log4j has caused the append parameter to be false by default. Also note that yet another update uses TerminalConsole instead of queue.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<Configuration status="WARN"> | |
<Appenders> | |
<Console name="WINDOWS_COMPAT" target="SYSTEM_OUT"></Console> | |
<TerminalConsole name="TerminalConsole"> | |
<PatternLayout pattern="%highlightError{%d{yyyy-MM-dd HH:mm:ss} [%t/%level] %minecraftFormatting{%msg}%n%xEx}" /> | |
</TerminalConsole> | |
<RandomAccessFile name="File" fileName="server.log" append="true"> | |
<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss} [%t/%level] %minecraftFormatting{%msg}{strip}%n" /> | |
</RandomAccessFile> | |
</Appenders> | |
<Loggers> | |
<Root level="info"> | |
<filters> | |
<MarkerFilter marker="NETWORK_PACKETS" onMatch="DENY" onMismatch="NEUTRAL" /> | |
</filters> | |
<AppenderRef ref="WINDOWS_COMPAT"/> | |
<AppenderRef ref="File"/> | |
<AppenderRef ref="TerminalConsole"/> | |
</Root> | |
</Loggers> | |
</Configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment