[rules-dev] Append the Logs For the events Fired

mamadou.ensi mohamed.ensi at gmail.com
Thu May 20 09:14:00 EDT 2010


public class LogDrools(){

public Logger mylogger = Logger.getLogger("file.log");

public void logInfo(String message, Object[] object){
String m ="";
m.append(message);
for(int i=0;i<object.size();i++){
m.append(":--:",objeci[i].toString());
}
mylogger.info(m);
}
/*you have mylogger.error, ...*/
}

public class AgendaListenerImpl implements AgendaEventListener{

LogDrools log =new LogDrools();
@Override
public void afterActivationFired(AfterActivationFiredEvent arg0) {
	log.logInfo("After Activation fired event", new
Object[]{arg0.getActivation().getRule().getPackageName();});
}
/*same thing for other methods
*/
}

I am ready to give you more details if you need

Regards
-- 
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Append-the-Logs-For-the-events-Fired-tp831348p831771.html
Sent from the Drools - Dev mailing list archive at Nabble.com.


More information about the rules-dev mailing list