tags:

views:

94

answers:

1

I'm new to Drools and they have these very nice debug listeners, DebugAgendaEventListener and DebugWorkingMEmoryEventListener, that spit events out to System.err. That's all well and good, but the underlying events don't implement toString() so you end up with a debug line that looks like:

org.drools.event.rule.impl.ActivationCreatedEventImpl@10c6cfc

Which isn't terribly useful. I feel I must be missing something obvious since I can't figure out why Drools would ship these listeners that don't actually give you any useful information. Is there some configuration I'm missing to make it spit out event details? I've looked at the EventXYZ code and there is no toString() so the behavior seems correct, but the manual shows examples where it spits out event details (granted, under Eclipse rather, but I wouldn't think that should matter for System.err spewing).

A: 

The Debug listeners like those don't seem much use for those events - as you say. I think they are mainly intended as a sample implementation? To do anything useful you would need your own implementations of those listeners I guess.

Michael Neale
That certainly appears to be the case. I wonder if they got "broken" in the recent release as the manual sure seems to indicate they used to be functional. Ah well, writing my own isn't a big deal.
Chris Kessel