<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16414" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>The WorkingMemoryFileLogger creates a list of
relevant events (you can use filters to define which events are relevant for
you) and just stores that as XML in the specified file. This log file is
not intended to be used directly (as it is indeed very complex). The
easiest way to see the content of the file in a user-friendly manner is to use
the eclipse IDE and use the audit view to open the file. This view will
then parse the content of the file and show it in a tree-like
structure.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>If you would like to personally define how events
are written out to a log file, you can always extend the abstract
WorkingMemoryLogger and define how events should be written out in the
logEventCreated(LogEvent) method.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Any contributions to making auditing more
configurable are greatly appreciated ! ;)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Kris</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=oananicolae1981@yahoo.com
href="mailto:oananicolae1981@yahoo.com">nicolae oana</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=rules-users@lists.jboss.org
href="mailto:rules-users@lists.jboss.org">Rules Users List</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, May 07, 2007 6:56 PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [rules-users] Help needed in
using working memory logger !</DIV>
<DIV><BR></DIV>Dear Kris,<BR><BR>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.<BR><BR>Here is the code:<BR><BR>final WorkingMemoryFileLogger logger =
new WorkingMemoryFileLogger( workingMemory );<BR>logger.setFileName(
"log/testRules" );<BR>ILogEventFilter filter = new
ILogEventFilter(){<BR>
<BR>
public boolean acceptEvent(LogEvent event){<BR>
<BR>
if(event.getType()==
LogEvent.OBJECT_MODIFIED)<BR>
{<BR>
logger.logEventCreated(event); <BR>
<BR>
return true;
<BR>
}<BR>
return
false;<BR>
}<BR> };
<BR><BR>logger.addFilter(filter);<BR>logger.writeToDisk();<BR>
<BR>With kind regards,<BR>
Oana <BR><BR><BR><B><I>Kris Verlaenen
<kris.verlaenen@cs.kuleuven.be></I></B> wrote:
<BLOCKQUOTE class=replbq
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid">
<META content="MSHTML 6.00.6000.16414" name=GENERATOR>
<STYLE></STYLE>
<DIV><FONT face=Arial size=2>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 <FONT
size=2>ActivationLogEventFilter and <FONT size=2>WorkingMemoryLogEventFilter
</FONT>for an example. You can add your filter to the logger using the
addFilter(<FONT size=2>ILogEventFilter</FONT>) method.</FONT></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Kris</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(0,0,0) 2px solid; MARGIN-RIGHT: 0px">
<DIV
style="FONT: 10pt arial; font-size-adjust: none; font-stretch: normal">-----
Original Message ----- </DIV>
<DIV
style="BACKGROUND: rgb(228,228,228) 0% 50%; FONT: 10pt arial; font-size-adjust: none; font-stretch: normal; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial"><B>From:</B>
<A title=oananicolae1981@yahoo.com
href="mailto:oananicolae1981@yahoo.com">nicolae oana</A> </DIV>
<DIV
style="FONT: 10pt arial; font-size-adjust: none; font-stretch: normal"><B>To:</B>
<A title=rules-users@lists.jboss.org
href="mailto:rules-users@lists.jboss.org">Rules Users List</A> </DIV>
<DIV
style="FONT: 10pt arial; font-size-adjust: none; font-stretch: normal"><B>Sent:</B>
Monday, May 07, 2007 3:22 PM</DIV>
<DIV
style="FONT: 10pt arial; font-size-adjust: none; font-stretch: normal"><B>Subject:</B>
[rules-users] Help needed in using working memory logger !</DIV>
<DIV><BR></DIV><BR>Hi everybody,<BR><BR>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.<BR><BR>Please help me with some
information about the Logger and its functionality!<BR><BR>With kind
regards,
<BR>
Oana<BR><BR><BR><BR><BR><BR>
<DIV></DIV>
<HR SIZE=1>
Ahhh...imagining that irresistible "new car" smell?<BR>Check out <A
href="http://us.rd.yahoo.com/evt=48245/*http://autos.yahoo.com/new_cars.html;_ylc=X3oDMTE1YW1jcXJ2BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDbmV3LWNhcnM-">new
cars at Yahoo! Autos.</A>
<DIV></DIV>
<HR>
<DIV></DIV>_______________________________________________<BR>rules-users
mailing
list<BR>rules-users@lists.jboss.org<BR>https://lists.jboss.org/mailman/listinfo/rules-users<BR></BLOCKQUOTE>_______________________________________________<BR>rules-users
mailing
list<BR>rules-users@lists.jboss.org<BR>https://lists.jboss.org/mailman/listinfo/rules-users<BR></BLOCKQUOTE><BR>
<P>
<HR SIZE=1>
Ahhh...imagining that irresistible "new car" smell?<BR>Check out <A
href="http://us.rd.yahoo.com/evt=48245/*http://autos.yahoo.com/new_cars.html;_ylc=X3oDMTE1YW1jcXJ2BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDbmV3LWNhcnM-">new
cars at Yahoo! Autos.</A>
<P>
<HR>
<P></P>_______________________________________________<BR>rules-users mailing
list<BR>rules-users@lists.jboss.org<BR>https://lists.jboss.org/mailman/listinfo/rules-users<BR></BLOCKQUOTE></BODY></HTML>