Skip to content
This repository was archived by the owner on Sep 23, 2025. It is now read-only.

Commit 42c1c98

Browse files
authored
fix(log): log4j with incorrect configuration (#6822)
* fix[log]: log4j with incorrect configuration, mostly in newer minecraft versions * fix[log]: add xml configuration for minecraft 1.21.2+ * refactor[log] improved getLog4jConfiguration() * refactor[log]: just change version number instead unpacking in a method to get the log4j config
1 parent 3b4364b commit 42c1c98

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Configuration status="WARN">
3+
<Appenders>
4+
<Console name="SysOut" target="SYSTEM_OUT">
5+
<PatternLayout pattern="[%d{HH:mm:ss}] [%t/%level]: %msg{nolookups}%n" />
6+
<Policies>
7+
<TimeBasedTriggeringPolicy />
8+
<OnStartupTriggeringPolicy />
9+
</Policies>
10+
</Console>
11+
<RollingRandomAccessFile name="File" fileName="logs/latest.log" filePattern="logs/%d{yyyy-MM-dd}-%i.log.gz">
12+
<PatternLayout pattern="[%d{HH:mm:ss}] [%t/%level]: %msg{nolookups}%n" />
13+
<Policies>
14+
<TimeBasedTriggeringPolicy />
15+
<OnStartupTriggeringPolicy />
16+
</Policies>
17+
</RollingRandomAccessFile>
18+
<Listener name="Tracy">
19+
<PatternLayout pattern="(%F:%L): %msg{nolookups}%n"/>
20+
</Listener>
21+
</Appenders>
22+
<Loggers>
23+
<Root level="info">
24+
<filters>
25+
<MarkerFilter marker="NETWORK_PACKETS" onMatch="DENY" onMismatch="NEUTRAL" />
26+
</filters>
27+
<AppenderRef ref="SysOut"/>
28+
<AppenderRef ref="File"/>
29+
<AppenderRef ref="Tracy"/>
30+
</Root>
31+
</Loggers>
32+
</Configuration>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1
1+
2

0 commit comments

Comments
 (0)