diff options
author | snowleo <schneeleo@gmail.com> | 2012-11-19 20:28:12 +0100 |
---|---|---|
committer | snowleo <schneeleo@gmail.com> | 2012-11-19 20:28:12 +0100 |
commit | 2f4329635819596f8189928dddf5bcf586b712bc (patch) | |
tree | d46c00b5aa2b0a3cc24272d77191b314fe032b8a /EssentialsProtect | |
parent | db47c5d23fecfe0cdac137a98cf8ebba358ef8e0 (diff) | |
download | Essentials-2f4329635819596f8189928dddf5bcf586b712bc.tar Essentials-2f4329635819596f8189928dddf5bcf586b712bc.tar.gz Essentials-2f4329635819596f8189928dddf5bcf586b712bc.tar.lz Essentials-2f4329635819596f8189928dddf5bcf586b712bc.tar.xz Essentials-2f4329635819596f8189928dddf5bcf586b712bc.zip |
Fix for the plugin conflict with any plugin that contains a log4j library
Diffstat (limited to 'EssentialsProtect')
-rw-r--r-- | EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java | 10 |
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() { |