From 007c5e34af8c4f7b5d02ebf0266406eb699309bd Mon Sep 17 00:00:00 2001 From: Underscore11 Date: Mon, 2 Aug 2021 00:57:31 -0700 Subject: [PATCH] Allow plugins to use Log4J to log (#6288) --- patches/api/Allow-plugins-to-use-SLF4J-for-logging.patch | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/patches/api/Allow-plugins-to-use-SLF4J-for-logging.patch b/patches/api/Allow-plugins-to-use-SLF4J-for-logging.patch index b04cff9a43..54dcebf8e8 100644 --- a/patches/api/Allow-plugins-to-use-SLF4J-for-logging.patch +++ b/patches/api/Allow-plugins-to-use-SLF4J-for-logging.patch @@ -33,11 +33,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @NotNull public Logger getLogger(); -+ // Paper start - Add SLF4J logger ++ // Paper start - Add SLF4J/Log4J loggers + @NotNull + default org.slf4j.Logger getSLF4JLogger() { + return org.slf4j.LoggerFactory.getLogger(getLogger().getName()); + } ++ ++ @NotNull ++ default org.apache.logging.log4j.Logger getLog4JLogger() { ++ return org.apache.logging.log4j.LogManager.getLogger(getLogger().getName()); ++ } + // Paper end + /**