X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fmain%2FSonePlugin.java;h=7723db1938d256aaa57f343a48c5241da8fd444c;hb=b1f3c46e6c76d216b70733c334642f87187676a9;hp=f2cf128f22beabcf531da6a7362a33433c0c129d;hpb=18ada47554280f444bb829dafc4d40926312066e;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/main/SonePlugin.java b/src/main/java/net/pterodactylus/sone/main/SonePlugin.java index f2cf128..7723db1 100644 --- a/src/main/java/net/pterodactylus/sone/main/SonePlugin.java +++ b/src/main/java/net/pterodactylus/sone/main/SonePlugin.java @@ -34,8 +34,10 @@ import freenet.support.*; import freenet.support.api.*; import com.google.common.annotations.*; +import com.google.common.eventbus.*; import com.google.common.cache.*; import com.google.inject.*; +import com.google.inject.Module; import com.google.inject.name.*; import kotlin.jvm.functions.*; @@ -50,12 +52,13 @@ public class SonePlugin implements FredPlugin, FredPluginFCP, FredPluginL10n, Fr static { /* initialize logging. */ soneLogger.setUseParentHandlers(false); + soneLogger.setLevel(Level.ALL); soneLogger.addHandler(new Handler() { private final LoadingCache> classCache = CacheBuilder.newBuilder() .build(new CacheLoader>() { @Override public Class load(String key) throws Exception { - return Class.forName(key); + return SonePlugin.class.getClassLoader().loadClass(key); } }); @@ -204,7 +207,7 @@ public class SonePlugin implements FredPlugin, FredPluginFCP, FredPluginL10n, Fr @VisibleForTesting protected Injector createInjector() { FreenetModule freenetModule = new FreenetModule(pluginRespirator); - AbstractModule soneModule = new SoneModule(this); + AbstractModule soneModule = new SoneModule(this, new EventBus()); Module webInterfaceModule = new WebInterfaceModule(); return createInjector(freenetModule, soneModule, webInterfaceModule);