[rules-dev] audit logging: better describe facts

Kris Verlaenen kris.verlaenen at cs.kuleuven.be
Mon Nov 3 14:14:24 EST 2008


At this point, no specific improvements have been implemented for the audit log.
It is indeed true that the audit log uses toString() to get a snapshot of the relevant elements / variables.
This seems a good default, but any improvements to make this more configurable are welcome of course.
The user could for example register a translator that translates elements of a given Class to a String.
The introspection you mention could be one of the options.
And we welcome any contributions ! :D

Kris

  ----- Original Message ----- 
  From: Oleg Zenzin 
  To: rules-dev at lists.jboss.org 
  Sent: Monday, October 27, 2008 12:53 AM
  Subject: [rules-dev] audit logging: better describe facts


  Best greatings to drools community!


  I'm using drools 4.0.4, my current aim is to generate audit log. 

  Using WorkingMemoryLogger and Drools Eclipse IDE Audit View I was able to fulfil the requirement. Looks pretty nice, thanx for your work!
  I have a couple of notes, but think it's better to keep them under different threads. The first one is about facts output. Currently WorkingMemoryLogger uses toString() to output information about facts inserted, updated or retracted. In addition there's information about facts in ActivationLogEvent, collected again using toString() default method. In my code I've implemented simple static method to introspect fact objects and produce Map<String, Object> of properties. That made the log much more informative.

  Question: are there any enhacements (planned) in next versions of Drools? Would you like me contribute my code into the WorkingMemoryLogger?

  Thanks!
  Oleg




------------------------------------------------------------------------------


  _______________________________________________
  rules-dev mailing list
  rules-dev at lists.jboss.org
  https://lists.jboss.org/mailman/listinfo/rules-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-dev/attachments/20081103/22beef58/attachment.html 


More information about the rules-dev mailing list