2018-11-11 09:40:41 +01:00
|
|
|
From 3f21e3db1dd0b0697a6562193be8bab9e9f0a78e Mon Sep 17 00:00:00 2001
|
2018-07-06 23:00:08 +02:00
|
|
|
From: Minecrell <minecrell@minecrell.net>
|
2017-09-24 12:07:49 +02:00
|
|
|
Date: Sun, 24 Sep 2017 12:06:49 +0200
|
|
|
|
Subject: [PATCH] Add Log4j configuration that replicates the old BungeeCord
|
|
|
|
setup
|
|
|
|
|
|
|
|
Can be enabled using -Dlog4j.configurationFile=log4j2-bungee.xml.
|
|
|
|
|
|
|
|
diff --git a/log4j/src/main/resources/log4j2-bungee.xml b/log4j/src/main/resources/log4j2-bungee.xml
|
|
|
|
new file mode 100644
|
2018-07-18 16:43:25 +02:00
|
|
|
index 00000000..6e9c09c5
|
2017-09-24 12:07:49 +02:00
|
|
|
--- /dev/null
|
|
|
|
+++ b/log4j/src/main/resources/log4j2-bungee.xml
|
|
|
|
@@ -0,0 +1,34 @@
|
|
|
|
+<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
+<!-- Log4j configuration that replicates the old BungeeCord logging setup -->
|
|
|
|
+<Configuration status="warn">
|
|
|
|
+ <Appenders>
|
|
|
|
+ <TerminalConsole name="TerminalConsole">
|
|
|
|
+ <PatternLayout>
|
2017-10-31 18:43:06 +01:00
|
|
|
+ <LoggerNamePatternSelector defaultPattern="%highlightError{%d{HH:mm:ss} [%level] [%logger] %minecraftFormatting{%msg}%n%ex}">
|
2017-09-24 12:07:49 +02:00
|
|
|
+ <!-- Log root and BungeeCord loggers without prefix -->
|
2017-10-31 18:43:06 +01:00
|
|
|
+ <PatternMatch key=",BungeeCord" pattern="%highlightError{%d{HH:mm:ss} [%level] %minecraftFormatting{%msg}%n%ex}" />
|
2017-09-24 12:07:49 +02:00
|
|
|
+ </LoggerNamePatternSelector>
|
|
|
|
+ </PatternLayout>
|
|
|
|
+ </TerminalConsole>
|
|
|
|
+ <RollingRandomAccessFile name="File" fileName="proxy.log.0" filePattern="proxy.log.%i" immediateFlush="false">
|
|
|
|
+ <PatternLayout>
|
2017-10-31 18:43:06 +01:00
|
|
|
+ <LoggerNamePatternSelector defaultPattern="%d{HH:mm:ss} [%level] [%logger] %minecraftFormatting{%msg}{strip}%n%ex">
|
2017-09-24 12:07:49 +02:00
|
|
|
+ <!-- Log root and BungeeCord loggers without prefix -->
|
2017-10-31 18:43:06 +01:00
|
|
|
+ <PatternMatch key=",BungeeCord" pattern="%d{HH:mm:ss} [%level] %minecraftFormatting{%msg}{strip}%n%ex" />
|
2017-09-24 12:07:49 +02:00
|
|
|
+ </LoggerNamePatternSelector>
|
|
|
|
+ </PatternLayout>
|
|
|
|
+ <Policies>
|
|
|
|
+ <OnStartupTriggeringPolicy />
|
|
|
|
+ <SizeBasedTriggeringPolicy size="8 MB" />
|
|
|
|
+ </Policies>
|
|
|
|
+ <DefaultRolloverStrategy fileIndex="min" max="8" />
|
|
|
|
+ </RollingRandomAccessFile>
|
|
|
|
+ </Appenders>
|
|
|
|
+
|
|
|
|
+ <Loggers>
|
2018-07-18 16:43:25 +02:00
|
|
|
+ <Root level="info">
|
2017-09-24 12:07:49 +02:00
|
|
|
+ <AppenderRef ref="TerminalConsole" />
|
|
|
|
+ <AppenderRef ref="File" />
|
2018-07-18 16:43:25 +02:00
|
|
|
+ </Root>
|
2017-09-24 12:07:49 +02:00
|
|
|
+ </Loggers>
|
|
|
|
+</Configuration>
|
|
|
|
--
|
2018-10-27 23:18:13 +02:00
|
|
|
2.19.1
|
2017-09-24 12:07:49 +02:00
|
|
|
|