|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.drools.logger.KnowledgeRuntimeLoggerFactory
public class KnowledgeRuntimeLoggerFactory
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 Summary | |
---|---|
KnowledgeRuntimeLoggerFactory()
|
Method Summary | |
---|---|
static KnowledgeRuntimeLogger |
newConsoleLogger(KnowledgeRuntimeEventManager session)
Logs events to command line console. |
static KnowledgeRuntimeLogger |
newFileLogger(KnowledgeRuntimeEventManager session,
String fileName)
Creates a file logger in the current thread. |
static KnowledgeRuntimeLogger |
newThreadedFileLogger(KnowledgeRuntimeEventManager session,
String fileName,
int interval)
Creates a file logger that executes in a different thread, where information is written on given intervals (in milliseconds). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public KnowledgeRuntimeLoggerFactory()
Method Detail |
---|
public static KnowledgeRuntimeLogger newFileLogger(KnowledgeRuntimeEventManager session, String fileName)
session
- fileName
- - .log is appended to this.
public static KnowledgeRuntimeLogger newThreadedFileLogger(KnowledgeRuntimeEventManager session, String fileName, int interval)
session
- fileName
- - .log is appended to this.interval
- - in milliseconds.
public static KnowledgeRuntimeLogger newConsoleLogger(KnowledgeRuntimeEventManager session)
session
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |