-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlog4j_config.xml
87 lines (81 loc) · 5.78 KB
/
log4j_config.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN" packages="com.mojang.util,net.minecrell.terminalconsole.util">
<Filters>
<!-- 煩死了這個登陸失敗提示-->
<StringMatchFilter text = "Failed to verify authentication" onMatch = "DENY" onMismatch = "NEUTRAL"/>
<StringMatchFilter text = "Failed to retrieve profile key pair" onMatch = "DENY" onMismatch = "NEUTRAL"/>
</Filters>
<Appenders>
<Console name="SysOut" target="SYSTEM_OUT">
<PatternLayout>
<LoggerNamePatternSelector defaultPattern="%style{[%d{HH:mm:ss}]}{blue} %highlight{[%t/%level]}{FATAL=red, ERROR=red, WARN=yellow, INFO=green, DEBUG=green, TRACE=blue} %style{(%logger{1})}{cyan} %highlight{%msg%n}{FATAL=red, ERROR=red, WARN=normal, INFO=normal, DEBUG=normal, TRACE=normal}" disableAnsi="${sys:fabric.log.disableAnsi:-true}">
<!-- Dont show the logger name for minecraft classes-->
<PatternMatch key="the_origin_of_magic" pattern="%style{[%d{HH:mm:ss}]}{blue} %highlight{[%t/%level]}{FATAL=red, ERROR=red, WARN=yellow, INFO=green, DEBUG=green, TRACE=blue} %style{(%logger{1})}{Magenta} %highlight{%msg%n}{FATAL=red, ERROR=red, WARN=normal, INFO=normal, DEBUG=normal, TRACE=normal}"/>
<PatternMatch key="net.minecraft.,com.mojang." pattern="%style{[%d{HH:mm:ss}]}{blue} %highlight{[%t/%level]}{FATAL=red, ERROR=red, WARN=yellow, INFO=green, DEBUG=green, TRACE=blue} %style{(Minecraft)}{cyan} %highlight{%msg{nolookups}%n}{FATAL=red, ERROR=red, WARN=normal, INFO=normal, DEBUG=normal, TRACE=normal}"/>
</LoggerNamePatternSelector>
</PatternLayout>
</Console>
<Queue name="ServerGuiConsole">
<PatternLayout>
<LoggerNamePatternSelector defaultPattern="%style{[%d{HH:mm:ss}]}{blue} %highlight{[%t/%level]}{FATAL=red, ERROR=red, WARN=yellow, INFO=green, DEBUG=green, TRACE=blue} %style{(%logger{1})}{cyan} %highlight{%msg%n}{FATAL=red, ERROR=red, WARN=normal, INFO=normal, DEBUG=normal, TRACE=normal}" disableAnsi="${sys:fabric.log.disableAnsi:-true}">
<!-- Dont show the logger name for minecraft classes-->
<PatternMatch key="com.ictye.the_origin_of_magic" pattern="%style{[%d{HH:mm:ss}]}{blue} %highlight{[%t/%level]}{FATAL=red, ERROR=red, WARN=yellow, INFO=green, DEBUG=green, TRACE=blue} %style{(%logger{1})}{Magenta} %highlight{%msg%n}{FATAL=red, ERROR=red, WARN=normal, INFO=normal, DEBUG=normal, TRACE=normal}"/>
<PatternMatch key="net.minecraft.,com.mojang." pattern="%style{[%d{HH:mm:ss}]}{blue} %highlight{[%t/%level]}{FATAL=red, ERROR=red, WARN=yellow, INFO=green, DEBUG=green, TRACE=blue} %style{(Minecraft)}{cyan} %highlight{%msg{nolookups}%n}{FATAL=red, ERROR=red, WARN=normal, INFO=normal, DEBUG=normal, TRACE=normal}"/>
</LoggerNamePatternSelector>
</PatternLayout>
</Queue>
<!-- latest.log same as vanilla -->
<RollingRandomAccessFile name="LatestFile" fileName="logs/latest.log" filePattern="logs/%d{yyyy-MM-dd}-%i.log.gz">
<PatternLayout>
<LoggerNamePatternSelector defaultPattern="[%d{HH:mm:ss}] [%t/%level] (%logger{1}) %msg{nolookups}%n">
<!-- Dont show the logger name for minecraft classes-->
<PatternMatch key="net.minecraft.,com.mojang." pattern="[%d{HH:mm:ss}] [%t/%level] (Minecraft) %msg{nolookups}%n"/>
</LoggerNamePatternSelector>
</PatternLayout>
<Policies>
<TimeBasedTriggeringPolicy />
<OnStartupTriggeringPolicy />
</Policies>
</RollingRandomAccessFile>
<!-- Debug log file -->
<RollingRandomAccessFile name="DebugFile" fileName="logs/debug.log" filePattern="logs/debug-%i.log.gz">
<PatternLayout pattern="[%d{HH:mm:ss}] [%t/%level] (%logger) %msg{nolookups}%n" />
<!-- Keep 5 files max -->
<DefaultRolloverStrategy max="5" fileIndex="min"/>
<Policies>
<SizeBasedTriggeringPolicy size="200MB"/>
<OnStartupTriggeringPolicy />
</Policies>
</RollingRandomAccessFile>
<RollingRandomAccessFile name="File" fileName="logs/latest.log" filePattern="logs/%d{yyyy-MM-dd}-%i.log.gz">
<PatternLayout pattern="[%d{HH:mm:ss}] [%t/%level]: %msg%n" />
<Policies>
<TimeBasedTriggeringPolicy />
<OnStartupTriggeringPolicy />
</Policies>
<DefaultRolloverStrategy max="1000"/>
</RollingRandomAccessFile>
</Appenders>
<Loggers>
<!-- <Logger level="${sys:fabric.log.level:-info}" name="net.minecraft"/>-->
<!-- <Root level="debug">-->
<!-- <AppenderRef ref="DebugFile"/>-->
<!-- <AppenderRef ref="SysOut"/>-->
<!-- <AppenderRef ref="LatestFile"/>-->
<!-- <AppenderRef ref="ServerGuiConsole"/>-->
<!-- </Root>-->
<Logger name="the_origin_of_magic" level="trace" additivity="false">
<AppenderRef ref="DebugFile" level="${sys:fabric.log.debug.level:-debug}" />
<AppenderRef ref="SysOut" />
<AppenderRef ref="LatestFile" level="${sys:fabric.log.level:-info}" />
<AppenderRef ref="ServerGuiConsole" />
</Logger>
<Logger level="${sys:fabric.log.level:-info}" name="net.minecraft"/>
<Root level="all">
<AppenderRef ref="DebugFile" level="${sys:fabric.log.debug.level:-debug}"/>
<AppenderRef ref="SysOut" level="${sys:fabric.log.level:-info}"/>
<AppenderRef ref="LatestFile" level="${sys:fabric.log.level:-info}"/>
<AppenderRef ref="ServerGuiConsole" level="${sys:fabric.log.level:-info}"/>
</Root>
</Loggers>
</Configuration>