mirror of
https://github.com/PaperMC/Waterfall.git
synced 2025-01-19 06:02:02 +01:00
d3dc2d3748
Drop the original console command completion patch and rewrite it for JLine 3. Add support to complete command names instead of just command arguments. The additional single thread executor for command completion was dropped because it's redundant: since the command completer needs to wait for it to complete anyway, we might as well do the completion directly from the console thread.
50 lines
2.5 KiB
Diff
50 lines
2.5 KiB
Diff
From c71a21cf7a460fe1aa7bdc2d4a58892e264b550f Mon Sep 17 00:00:00 2001
|
|
From: Minecrell <dev@minecrell.net>
|
|
Date: Fri, 22 Sep 2017 13:07:31 +0200
|
|
Subject: [PATCH] Handle plugin prefixes using Log4J
|
|
|
|
|
|
diff --git a/api/src/main/java/net/md_5/bungee/api/plugin/Plugin.java b/api/src/main/java/net/md_5/bungee/api/plugin/Plugin.java
|
|
index bc91208a..e85b4914 100644
|
|
--- a/api/src/main/java/net/md_5/bungee/api/plugin/Plugin.java
|
|
+++ b/api/src/main/java/net/md_5/bungee/api/plugin/Plugin.java
|
|
@@ -85,7 +85,7 @@ public class Plugin
|
|
this.proxy = proxy;
|
|
this.description = description;
|
|
this.file = description.getFile();
|
|
- this.logger = new PluginLogger( this );
|
|
+ this.logger = Logger.getLogger(description.getName()); // Waterfall - Handle plugin prefixes in implementation
|
|
}
|
|
|
|
//
|
|
diff --git a/log4j/src/main/resources/log4j2.xml b/log4j/src/main/resources/log4j2.xml
|
|
index d4a81199..3664f30e 100644
|
|
--- a/log4j/src/main/resources/log4j2.xml
|
|
+++ b/log4j/src/main/resources/log4j2.xml
|
|
@@ -2,10 +2,20 @@
|
|
<Configuration status="warn">
|
|
<Appenders>
|
|
<TerminalConsole name="TerminalConsole">
|
|
- <PatternLayout pattern="%highlightError{[%d{HH:mm:ss} %level]: %minecraftFormatting{%msg}%n%xEx}" />
|
|
+ <PatternLayout>
|
|
+ <LoggerNamePatternSelector defaultPattern="%highlightError{[%d{HH:mm:ss} %level] [%logger]: %minecraftFormatting{%msg}%n%xEx}">
|
|
+ <!-- Log root and BungeeCord loggers without prefix -->
|
|
+ <PatternMatch key=",BungeeCord" pattern="%highlightError{[%d{HH:mm:ss} %level]: %minecraftFormatting{%msg}%n%xEx}" />
|
|
+ </LoggerNamePatternSelector>
|
|
+ </PatternLayout>
|
|
</TerminalConsole>
|
|
<RollingRandomAccessFile name="File" fileName="logs/latest.log" filePattern="logs/%d{yyyy-MM-dd}-%i.log.gz" immediateFlush="false">
|
|
- <PatternLayout pattern="[%d{HH:mm:ss}] [%t/%level]: %minecraftFormatting{%msg}{strip}%n" />
|
|
+ <PatternLayout>
|
|
+ <LoggerNamePatternSelector defaultPattern="[%d{HH:mm:ss}] [%t/%level] [%logger]: %minecraftFormatting{%msg}{strip}%n">
|
|
+ <!-- Log root and BungeeCord loggers without prefix -->
|
|
+ <PatternMatch key=",BungeeCord" pattern="[%d{HH:mm:ss}] [%t/%level]: %minecraftFormatting{%msg}{strip}%n" />
|
|
+ </LoggerNamePatternSelector>
|
|
+ </PatternLayout>
|
|
<Policies>
|
|
<TimeBasedTriggeringPolicy />
|
|
<OnStartupTriggeringPolicy />
|
|
--
|
|
2.14.1
|
|
|