Waterfall/BungeeCord-Patches/0038-Add-Log4j-configuration-that-replicates-the-old-Bung.patch
_tomcraft 85c0a35f0b
Updated Upstream (BungeeCord) (#695)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

BungeeCord Changes:
6613aaea Add test fix for library classes being visible to non-dependent plugins
53ce6b93 #3200: Fix protocol for 21w40a
d8e29384 #2466: Use switch in "BungeeCord" plugin message handling
5cf869df #3198: Remove terminally deprecated SecurityManager
f26f7d88 Add optional 1.18 (21w40a) snapshot protocol support
2021-10-09 10:43:12 +01:00

52 lines
2.2 KiB
Diff

From 3d6b47a2d059f408afdcd3e65c60ba6a127a2e4b Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net>
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
index 00000000..6e9c09c5
--- /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>
+ <LoggerNamePatternSelector defaultPattern="%highlightError{%d{HH:mm:ss} [%level] [%logger] %minecraftFormatting{%msg}%n%ex}">
+ <!-- Log root and BungeeCord loggers without prefix -->
+ <PatternMatch key=",BungeeCord" pattern="%highlightError{%d{HH:mm:ss} [%level] %minecraftFormatting{%msg}%n%ex}" />
+ </LoggerNamePatternSelector>
+ </PatternLayout>
+ </TerminalConsole>
+ <RollingRandomAccessFile name="File" fileName="proxy.log.0" filePattern="proxy.log.%i" immediateFlush="false">
+ <PatternLayout>
+ <LoggerNamePatternSelector defaultPattern="%d{HH:mm:ss} [%level] [%logger] %minecraftFormatting{%msg}{strip}%n%ex">
+ <!-- Log root and BungeeCord loggers without prefix -->
+ <PatternMatch key=",BungeeCord" pattern="%d{HH:mm:ss} [%level] %minecraftFormatting{%msg}{strip}%n%ex" />
+ </LoggerNamePatternSelector>
+ </PatternLayout>
+ <Policies>
+ <OnStartupTriggeringPolicy />
+ <SizeBasedTriggeringPolicy size="8 MB" />
+ </Policies>
+ <DefaultRolloverStrategy fileIndex="min" max="8" />
+ </RollingRandomAccessFile>
+ </Appenders>
+
+ <Loggers>
+ <Root level="info">
+ <AppenderRef ref="TerminalConsole" />
+ <AppenderRef ref="File" />
+ </Root>
+ </Loggers>
+</Configuration>
--
2.30.1 (Apple Git-130)