In Drools 5.5.0.Beta1, we 'll have Logback, Log4J, JDKLogger, ...
support through SLF4J:
https://hudson.jboss.org/hudson/view/Drools%20jBPM/job/drools/lastSuccess...
But to use it, you 'll have to combine it with
WorkingMemoryConsoleLogger instead I believe.
Using Logback it's fairly easy to set the rules on appending to the log,
rolling the log, zipping the old logs, ...
http://logback.qos.ch/manual/appenders.html => section FileAppender
Op 12-09-12 14:35, himansu.nayak schreef:
Hi,
i am trying to append my memory log generated by drools rule engine. but
each time
i run the code the log just get overwritten. is there any way to avoid
overwritten of my log.
this is the code i am using for my log generation.
type 1
---------
WorkingMemory workingMemory = ruleBase.newStatefulSession();
WorkingMemoryFileLogger wmLogger = new WorkingMemoryFileLogger(
workingMemory);
wmLogger.setFileName("log/xyz");
.
.
.
wmLogger.writeToDisk();
type 2
---------
KnowledgeRuntimeLogger logger = KnowledgeRuntimeLoggerFactory
.newFileLogger(ksession,
log/xyz.log);
ksession.addEventListener(CustomAgendaEventListener.getInstance());
ksession.addEventListener(CustomWorkingMemoryEventListener
.getInstance());
.
.
.
.
logger.close();
--
View this message in context:
http://drools.46999.n3.nabble.com/Drools-Memory-Log-getting-over-written-...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users