geforkt von Mirrors/Velocity
Add JUL support to log4j
Certain badly behaved plugins insist on logging with java.util.logging. Accommodate them.
Dieser Commit ist enthalten in:
Ursprung
68ae92f977
Commit
4bc76b3012
@ -57,6 +57,7 @@ dependencies {
|
|||||||
implementation "org.apache.logging.log4j:log4j-core:${log4jVersion}"
|
implementation "org.apache.logging.log4j:log4j-core:${log4jVersion}"
|
||||||
implementation "org.apache.logging.log4j:log4j-slf4j-impl:${log4jVersion}"
|
implementation "org.apache.logging.log4j:log4j-slf4j-impl:${log4jVersion}"
|
||||||
implementation "org.apache.logging.log4j:log4j-iostreams:${log4jVersion}"
|
implementation "org.apache.logging.log4j:log4j-iostreams:${log4jVersion}"
|
||||||
|
implementation "org.apache.logging.log4j:log4j-jul:${log4jVersion}"
|
||||||
|
|
||||||
implementation 'net.sf.jopt-simple:jopt-simple:5.0.4' // command-line options
|
implementation 'net.sf.jopt-simple:jopt-simple:5.0.4' // command-line options
|
||||||
implementation 'net.minecrell:terminalconsoleappender:1.2.0'
|
implementation 'net.minecrell:terminalconsoleappender:1.2.0'
|
||||||
|
@ -8,9 +8,12 @@ import org.apache.logging.log4j.Logger;
|
|||||||
|
|
||||||
public class Velocity {
|
public class Velocity {
|
||||||
|
|
||||||
private static final Logger logger = LogManager.getLogger(Velocity.class);
|
private static final Logger logger;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
|
System.setProperty("java.util.logging.manager", "org.apache.logging.log4j.jul.LogManager");
|
||||||
|
logger = LogManager.getLogger(Velocity.class);
|
||||||
|
|
||||||
// We use BufferedImage for favicons, and on macOS this puts the Java application in the dock.
|
// We use BufferedImage for favicons, and on macOS this puts the Java application in the dock.
|
||||||
// How inconvenient. Force AWT to work with its head chopped off.
|
// How inconvenient. Force AWT to work with its head chopped off.
|
||||||
System.setProperty("java.awt.headless", "true");
|
System.setProperty("java.awt.headless", "true");
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren