mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-17 06:48:23 +01:00
Allow plugins to use Log4J to log (#6288)
This commit is contained in:
parent
73f9a698de
commit
007c5e34af
1 changed files with 6 additions and 1 deletions
|
@ -33,11 +33,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
@NotNull
|
@NotNull
|
||||||
public Logger getLogger();
|
public Logger getLogger();
|
||||||
|
|
||||||
+ // Paper start - Add SLF4J logger
|
+ // Paper start - Add SLF4J/Log4J loggers
|
||||||
+ @NotNull
|
+ @NotNull
|
||||||
+ default org.slf4j.Logger getSLF4JLogger() {
|
+ default org.slf4j.Logger getSLF4JLogger() {
|
||||||
+ return org.slf4j.LoggerFactory.getLogger(getLogger().getName());
|
+ 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
|
+ // Paper end
|
||||||
+
|
+
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue