use of org.pentaho.di.core.logging.ConsoleLoggingEventListener in project pentaho-kettle by pentaho.
the class KettleClientEnvironment method init.
public static synchronized void init(List<PluginTypeInterface> pluginsToLoad) throws KettleException {
if (initialized != null) {
return;
}
if (KettleClientEnvironment.instance == null) {
KettleClientEnvironment.instance = new KettleClientEnvironment();
}
createKettleHome();
// Read the kettle.properties file before anything else
//
EnvUtil.environmentInit();
// Initialize the logging back-end.
//
KettleLogStore.init();
//
if (!"Y".equalsIgnoreCase(System.getProperty(Const.KETTLE_DISABLE_CONSOLE_LOGGING, "N"))) {
KettleLogStore.getAppender().addLoggingEventListener(new ConsoleLoggingEventListener());
}
KettleLogStore.getAppender().addLoggingEventListener(new Slf4jLoggingEventListener());
// Load plugins
//
pluginsToLoad.forEach(PluginRegistry::addPluginType);
PluginRegistry.init();
List<PluginInterface> logginPlugins = PluginRegistry.getInstance().getPlugins(LoggingPluginType.class);
initLogginPlugins(logginPlugins);
String passwordEncoderPluginID = Const.NVL(EnvUtil.getSystemProperty(Const.KETTLE_PASSWORD_ENCODER_PLUGIN), "Kettle");
Encr.init(passwordEncoderPluginID);
initialized = new Boolean(true);
}
Aggregations