Thanks Macon, That is the information I was looking for. I was looking at the code and it looked like there were some comments hinting at making the SystemEventListener configurable. Is this a future feature? or am I reading too much into the comments?
Thanks, Steve Ronderos [email protected] wrote on 10/01/2009 10:30:58 AM: > [image removed] > > Re: [rules-users] (no subject) > > Pegram, Macon > > to: > > Rules Users List > > 10/01/2009 10:34 AM > > Sent by: > > [email protected] > > Please respond to Rules Users List > > What you need to do is implement your own SystemEventListener > implementation to override the default one. Before you do anything > meaningful with Drools, you’ll want to override the default by calling: > SystemEventListenerFactory.setSystemEventListener(<YOUR > SystemEventListenerImpl>); > > Here’s a basic no-op listener: > new SystemEventListener () { > > public void debug(String arg0) { } > public void debug(String arg0, Object arg1) {} > public void exception(Throwable arg0) {} > public void exception(String arg0, Throwable arg1) {} > public void info(String arg0) {} > public void info(String arg0, Object arg1) {} > public void warning(String arg0) {} > public void warning(String arg0, Object arg1) {} > > }; > > In reality what you probably want to do is hook in your > application’s logger here so it will respect the same log levels the > rest of your application runs under. > > Macon > > > > From: [email protected] [mailto:rules-users- > [email protected]] On Behalf Of Steve Ronderos > Sent: Wednesday, September 30, 2009 12:53 PM > To: [email protected] > Subject: [rules-users] (no subject) > > > Hello Drools Users, > > I've been looking into why Drools 5 is logging debug and info > messages to System.out in my app and trying to figure out how to > make it stop. It looks like the SystemEventListener that the > SystemEventListenerFactory returns is a > DelegatingSystemEventListener that delegates to a > PrintStreamSystemEventListener. This, by default, uses System.out > as the print stream target. I looked into the Factory and it looks > like I can provide a different SystemEventListener or > SystemEventListenerProvider, but it also mentions that it did not > find anything in the properties, so it fails over to the default > SystemEventListenerProvider. Is there a way to configure a custom > SystemEventListener or SystemEventListenerProvider so that you don't > have to call > SystemEventListenerFactory.setSystemEventListenerProvider() at startup? > > Thanks, > > Steve Ronderos_______________________________________________ > rules-users mailing list > [email protected] > https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users
