-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
log-config-packets-only-console.xml
44 lines (44 loc) · 2.31 KB
/
log-config-packets-only-console.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?xml version="1.0" encoding="UTF-8"?>
<Configuration xmlns:xi="http://www.w3.org/2001/XInclude" status="WARN" packages="com.mojang.util" monitorInterval="30">
<Appenders>
<RollingRandomAccessFile name="PacketFile" fileName="logs/packets-latest.log" filePattern="logs/%d{yyyy-MM-dd}-%i.packet-log.gz">
<MarkerFilter marker="NETWORK_PACKETS" onMatch="ACCEPT" onMismatch="DENY" />
<PatternLayout pattern="[%d{HH:mm:ss}] [%t/%level]: %msg%n" />
<Policies>
<TimeBasedTriggeringPolicy />
<OnStartupTriggeringPolicy />
</Policies>
</RollingRandomAccessFile>
<Async name="AsyncPackets">
<filters>
<!-- We mainly care about sent packets. If you want received only use "PACKET_RECEIVED". -->
<!-- If you want both sent and received, use NETWORK_PACKETS. -->
<MarkerFilter marker="PACKET_SENT" onMatch="NEUTRAL" onMismatch="DENY" />
<!-- Add the packet IDs of the packets you want to ignore to the regex.-->
<!-- Please use decimal values and not hex; more info: https://wiki.vg/Debugging#Network_packets_only -->
<RegexFilter regex=".*(PLAY:(?:0|3|4|5|6|15)).*" onMatch="DENY" onMismatch="ACCEPT"/>
</filters>
<AppenderRef ref="SysOut" level="DEBUG" />
<AppenderRef ref="PacketFile" />
</Async>
</Appenders>
<Loggers>
<Logger level="debug" name="net.minecraft" additivity="false">
<AppenderRef ref="AsyncPackets" />
<AppenderRef ref="File">
<filters>
<ThresholdFilter level="INFO" onMatch="NEUTRAL" onMismatch="DENY" />
<MarkerFilter marker="NETWORK_PACKETS" onMatch="DENY" onMismatch="NEUTRAL" />
</filters>
</AppenderRef>
</Logger>
<Root level="all">
<AppenderRef ref="FmlSysOut" level="INFO">
<!-- No packets are logged in here. This just removes all the FML messages from the console. -->
<MarkerFilter marker="NETWORK_PACKETS" onMatch="ACCEPT" onMismatch="DENY" />
</AppenderRef>
<AppenderRef ref="FmlFile"/>
</Root>
</Loggers>
<xi:include href="log-config.xml" />
</Configuration>