mirror of
https://github.com/PaperMC/Waterfall.git
synced 2024-10-06 18:38:00 +02:00
17d5b78fdd
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: a52ea500 #2769: Guardian target beam lost on server change 17d5dd3f Add dist Maven profile to generate source and Javadoc jars 9e8ab747 Add JsonConfiguration support to bungeecord-config cdacc0b1 #2498: Add ServerConnectRequest accessor in ServerConnectEvent. b4b998b2 #2761: Add ClientConnectEvent
60 lines
2.0 KiB
Diff
60 lines
2.0 KiB
Diff
From 0116c8f04967a0c811477029d574d2e55a5b9193 Mon Sep 17 00:00:00 2001
|
|
From: Minecrell <minecrell@minecrell.net>
|
|
Date: Fri, 22 Sep 2017 13:15:09 +0200
|
|
Subject: [PATCH] Allow plugins to use SLF4J for logging
|
|
|
|
|
|
diff --git a/api/pom.xml b/api/pom.xml
|
|
index 15228459..705b7279 100644
|
|
--- a/api/pom.xml
|
|
+++ b/api/pom.xml
|
|
@@ -55,5 +55,11 @@
|
|
<version>1.25</version>
|
|
<scope>compile</scope>
|
|
</dependency>
|
|
+ <!-- Waterfall - Add SLF4J -->
|
|
+ <dependency>
|
|
+ <groupId>org.slf4j</groupId>
|
|
+ <artifactId>slf4j-api</artifactId>
|
|
+ <version>1.7.25</version>
|
|
+ </dependency>
|
|
</dependencies>
|
|
</project>
|
|
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 e85b4914..2e5ae4fb 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
|
|
@@ -27,6 +27,12 @@ public class Plugin
|
|
@Getter
|
|
private Logger logger;
|
|
|
|
+ // Waterfall start - Allow plugins to use SLF4J for logging
|
|
+ public org.slf4j.Logger getSLF4JLogger() {
|
|
+ return org.slf4j.LoggerFactory.getLogger(logger.getName());
|
|
+ }
|
|
+ // Waterfall end
|
|
+
|
|
/**
|
|
* Called when the plugin has just been loaded. Most of the proxy will not
|
|
* be initialized, so only use it for registering
|
|
diff --git a/log4j/pom.xml b/log4j/pom.xml
|
|
index a044119e..f5267567 100644
|
|
--- a/log4j/pom.xml
|
|
+++ b/log4j/pom.xml
|
|
@@ -38,6 +38,12 @@
|
|
<artifactId>log4j-jul</artifactId>
|
|
<version>${log4j2.version}</version>
|
|
</dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.apache.logging.log4j</groupId>
|
|
+ <artifactId>log4j-slf4j-impl</artifactId>
|
|
+ <version>${log4j2.version}</version>
|
|
+ <scope>runtime</scope>
|
|
+ </dependency>
|
|
<dependency>
|
|
<groupId>com.lmax</groupId>
|
|
<artifactId>disruptor</artifactId>
|
|
--
|
|
2.25.0
|
|
|