[rules-users] Help needed in using working memory logger !
nicolae oana
oananicolae1981 at yahoo.com
Mon May 7 12:56:07 EDT 2007
Dear Kris,
I try to create a filter for my logger, in order to obtain some simple output (e.g. list modified objects), but the output is still very complex :( . I think that I did something wrong.
Here is the code:
final WorkingMemoryFileLogger logger = new WorkingMemoryFileLogger( workingMemory );
logger.setFileName( "log/testRules" );
ILogEventFilter filter = new ILogEventFilter(){
public boolean acceptEvent(LogEvent event){
if(event.getType()== LogEvent.OBJECT_MODIFIED)
{
logger.logEventCreated(event);
return true;
}
return false;
}
};
logger.addFilter(filter);
logger.writeToDisk();
With kind regards,
Oana
Kris Verlaenen <kris.verlaenen at cs.kuleuven.be> wrote: You just need to create a class that implements this interface and that determines which events should be logged (see the javadoc of the filter and the working memory logger). See ActivationLogEventFilter and WorkingMemoryLogEventFilter for an example. You can add your filter to the logger using the addFilter(ILogEventFilter) method.
Kris
----- Original Message -----
From: nicolae oana
To: Rules Users List
Sent: Monday, May 07, 2007 3:22 PM
Subject: [rules-users] Help needed in using working memory logger !
Hi everybody,
I try to define an ILogEventFilter on the working memory logger, but I didn't find anything about how to do this, on the available documentation.
Please help me with some information about the Logger and its functionality!
With kind regards,
Oana
---------------------------------
Ahhh...imagining that irresistible "new car" smell?
Check out new cars at Yahoo! Autos.
---------------------------------
_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
---------------------------------
Ahhh...imagining that irresistible "new car" smell?
Check outnew cars at Yahoo! Autos.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070507/307b6ada/attachment.html
More information about the rules-users
mailing list