/** * Get the delegate plugin * * @param name the name of the logger * @param resourceBundleName the default resource bundle name to use * @return the plugin */ static LoggerPluginInstance getDelegatePluginInstance(String name, String resourceBundleName) { LoggerPlugin plugin; LoggerPluginInstance instance; try { plugin = (LoggerPlugin) pluginClass.newInstance(); } catch (Throwable e) { plugin = new NullLoggerPlugin(); } try { instance = plugin.getInstance(name, resourceBundleName); } catch (Throwable e) { System.err.println("Failed to initalize plugin: " + plugin + ", cause: " + e.toString()); instance = new NullLoggerPluginInstance(name, NullLoggerPlugin.INSTANCE); } return instance; }