Package org.kie.kogito.logger
Class KogitoRuntimeLoggerFactory
java.lang.Object
org.kie.kogito.logger.KogitoRuntimeLoggerFactory
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.kie.api.logger.KieRuntimeLoggernewConsoleLogger(org.kie.api.event.KieRuntimeEventManager session) Logs events to command line console.static org.kie.api.logger.KieRuntimeLoggernewFileLogger(org.kie.api.event.KieRuntimeEventManager session, String fileName) Creates a file logger in the current thread.static org.kie.api.logger.KieRuntimeLoggernewThreadedFileLogger(org.kie.api.event.KieRuntimeEventManager session, String fileName, int interval) Creates a file logger that executes in a different thread, where information is written on given intervals (in milliseconds).
-
Method Details
-
newFileLogger
public static org.kie.api.logger.KieRuntimeLogger newFileLogger(org.kie.api.event.KieRuntimeEventManager session, String fileName) Creates a file logger in the current thread. The file is in XML format, suitable for interpretation by Eclipse's Drools Audit View or other tools. Note that while events are written as they happen, the file will not be flushed until it is closed or the underlying file buffer is filled. If you need real time logging then use a Console Logger or a Threaded File Logger.- Parameters:
session-fileName- - .log is appended to this.- Returns:
-
newThreadedFileLogger
public static org.kie.api.logger.KieRuntimeLogger newThreadedFileLogger(org.kie.api.event.KieRuntimeEventManager session, String fileName, int interval) Creates a file logger that executes in a different thread, where information is written on given intervals (in milliseconds). The file is in XML format, suitable for interpretation by Eclipse's Drools Audit View or other tools.- Parameters:
session-fileName- - .log is appended to this.interval- - in milliseconds.- Returns:
-
newConsoleLogger
public static org.kie.api.logger.KieRuntimeLogger newConsoleLogger(org.kie.api.event.KieRuntimeEventManager session) Logs events to command line console. This is not in XML format, so it cannot be parsed by other tools, but is in real time and is more human readable.- Parameters:
session-- Returns:
-