Hi All, As a follow up to my last questions on events, I did try another approach which also mysteriously doesn't work, but seems logical. I figured that I'd just use store() to put a reference to the Log4J logger object in Jess like so:
engine.store("logger", this.logger) // there was a private field holding the logger not shown Then, I wrote a deffunction around calling that logger like this: (deffunction MAIN::log-info (?message) (bind ?logger (fetch logger)) (if (not (eq ?logger nil)) then (call ?logger info (str-cat "jess: " ?message)))) Then, I figured that in order to log messages all I had to do was to call that function from the RHS of any rule like: (defrule log-foo (foo) => (MAIN::log-info "Some message to log") Alas, no such luck. The rule activates and fires, but no message comes through. Seems like this should work. What am I missing? -JM ------------------------ Jason Morris Morris Technical Solutions [EMAIL PROTECTED] www.morristechnicalsolutions.com fax/phone: 503.692.1088 -------------------------------------------------------------------- To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]' in the BODY of a message to [EMAIL PROTECTED], NOT to the list (use your own address!) List problems? Notify [EMAIL PROTECTED] --------------------------------------------------------------------