aboutsummaryrefslogtreecommitdiffhomepage
path: root/paper-server/src/main/resources/log4j2.xml
diff options
context:
space:
mode:
Diffstat (limited to 'paper-server/src/main/resources/log4j2.xml')
-rw-r--r--paper-server/src/main/resources/log4j2.xml46
1 files changed, 46 insertions, 0 deletions
diff --git a/paper-server/src/main/resources/log4j2.xml b/paper-server/src/main/resources/log4j2.xml
new file mode 100644
index 0000000000..ea4e2161c0
--- /dev/null
+++ b/paper-server/src/main/resources/log4j2.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Configuration status="WARN" packages="com.mojang.util">
+ <Appenders>
+ <Queue name="ServerGuiConsole">
+ <PatternLayout pattern="[%d{HH:mm:ss} %level]: %msg%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="File"/>
+ <AppenderRef ref="TerminalConsole" level="info"/>
+ <AppenderRef ref="ServerGuiConsole" level="info"/>
+ </Async>
+ </Appenders>
+ <Loggers>
+ <Root level="info">
+ <filters>
+ <MarkerFilter marker="NETWORK_PACKETS" onMatch="DENY" onMismatch="NEUTRAL" />
+ </filters>
+ <AppenderRef ref="Async"/>
+ </Root>
+ </Loggers>
+</Configuration>