*/
public class SonePlugin implements FredPlugin, FredPluginFCP, FredPluginL10n, FredPluginBaseL10n, FredPluginThreadless, FredPluginVersioned {
+ private static final Logger soneLogger = getLogger("net.pterodactylus.sone");
+
static {
/* initialize logging. */
- Logger soneLogger = getLogger("net.pterodactylus.sone");
soneLogger.setUseParentHandlers(false);
soneLogger.addHandler(new Handler() {
private final LoadingCache<String, Class<?>> classCache = CacheBuilder.newBuilder()
*/
@Override
public void terminate() {
+ deregisterLoggerHandlers();
try {
/* stop the web interface. */
webInterface.stop();
}
}
+ private void deregisterLoggerHandlers() {
+ for (Handler handler : soneLogger.getHandlers()) {
+ soneLogger.removeHandler(handler);
+ }
+ }
+
//
// INTERFACE FredPluginFCP
//