Search in sources :

Example 1 with KieLoggers

use of org.kie.api.logger.KieLoggers in project drools by kiegroup.

the class KieContainerImpl method registerLoggers.

private void registerLoggers(KieSessionModelImpl kSessionModel, KieRuntimeEventManager kSession) {
    KieLoggers kieLoggers = KieServices.Factory.get().getLoggers();
    if (kSessionModel.getConsoleLogger() != null) {
        kieLoggers.newConsoleLogger(kSession);
    }
    FileLoggerModel fileLogger = kSessionModel.getFileLogger();
    if (fileLogger != null) {
        if (fileLogger.isThreaded()) {
            kieLoggers.newThreadedFileLogger(kSession, fileLogger.getFile(), fileLogger.getInterval());
        } else {
            kieLoggers.newFileLogger(kSession, fileLogger.getFile());
        }
    }
}
Also used : KieLoggers(org.kie.api.logger.KieLoggers) FileLoggerModel(org.kie.api.builder.model.FileLoggerModel)

Aggregations

FileLoggerModel (org.kie.api.builder.model.FileLoggerModel)1 KieLoggers (org.kie.api.logger.KieLoggers)1