public class KnowledgeRuntimeLoggerFactory extends Object
The KnowledgeRuntimeLogger uses the comprehensive event system to create an audit log that can be used to log the execution of the session for later inspection, in tools such as the Eclipse audit viewer.
KnowledgeRuntimeLogger logger = KnowledgeRuntimeLoggerFactory.newFileLogger(ksession, "logdir/mylogfile"); .... logger.close();
Don't forget to close the logger when it is no longer needed, so resources can be released.
Constructor and Description |
---|
KnowledgeRuntimeLoggerFactory() |
Modifier and Type | Method and Description |
---|---|
static org.kie.api.logger.KieRuntimeLogger |
newConsoleLogger(org.kie.api.event.KieRuntimeEventManager session)
Logs events to command line console.
|
static org.kie.api.logger.KieRuntimeLogger |
newFileLogger(org.kie.api.event.KieRuntimeEventManager session,
String fileName)
Creates a file logger in the current thread.
|
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).
|
public static org.kie.api.logger.KieRuntimeLogger newFileLogger(org.kie.api.event.KieRuntimeEventManager session, String fileName)
session
- fileName
- - .log is appended to this.public static org.kie.api.logger.KieRuntimeLogger newThreadedFileLogger(org.kie.api.event.KieRuntimeEventManager session, String fileName, int interval)
session
- fileName
- - .log is appended to this.interval
- - in milliseconds.public static org.kie.api.logger.KieRuntimeLogger newConsoleLogger(org.kie.api.event.KieRuntimeEventManager session)
session
- Copyright © 2001–2018 JBoss by Red Hat. All rights reserved.