summaryrefslogtreecommitdiffstats
path: root/EssentialsProtect/src
diff options
context:
space:
mode:
authorsnowleo <schneeleo@gmail.com>2012-11-19 20:28:12 +0100
committersnowleo <schneeleo@gmail.com>2012-11-19 20:28:12 +0100
commit1363406b84477db08be0e1bea7bb18cf17999511 (patch)
tree3b2e2aebcb1b14ee550d8e20866a385de2711447 /EssentialsProtect/src
parent42872650d25c1403ef9e6c435819f6e8c50a2c60 (diff)
downloadEssentials-1363406b84477db08be0e1bea7bb18cf17999511.tar
Essentials-1363406b84477db08be0e1bea7bb18cf17999511.tar.gz
Essentials-1363406b84477db08be0e1bea7bb18cf17999511.tar.lz
Essentials-1363406b84477db08be0e1bea7bb18cf17999511.tar.xz
Essentials-1363406b84477db08be0e1bea7bb18cf17999511.zip
Fix for the plugin conflict with any plugin that contains a log4j library
Diffstat (limited to 'EssentialsProtect/src')
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java
index 06dc03656..1bd9991a9 100644
--- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java
+++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java
@@ -27,6 +27,16 @@ public class EssentialsProtect extends JavaPlugin implements IProtect
@Override
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.setFilter(new Filter()
{