mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-10 08:34:17 +02:00
Fix for the plugin conflict with any plugin that contains a log4j library
This commit is contained in:
@@ -27,6 +27,16 @@ public class EssentialsProtect extends JavaPlugin implements IProtect
|
|||||||
@Override
|
@Override
|
||||||
public void onLoad()
|
public void onLoad()
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
|
// Simple fix for the case that log4j is on the class path by another plugin
|
||||||
|
Class basicConfiguratorClass = Class.forName("org.apache.log4j.BasicConfigurator");
|
||||||
|
basicConfiguratorClass.getMethod("configure").invoke(null);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
//Ignore me, log4j not found on classloader.
|
||||||
|
}
|
||||||
|
|
||||||
C3P0logger = com.mchange.v2.log.MLog.getLogger(com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.class);
|
C3P0logger = com.mchange.v2.log.MLog.getLogger(com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.class);
|
||||||
C3P0logger.setFilter(new Filter()
|
C3P0logger.setFilter(new Filter()
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user