开发者

How To Quiet Drools Resource Scanner Logging?

I am using Drool's resource scanner like so:

ResourceChangeScannerConfiguration sconf = ResourceFactory.getResourceChangeScannerService().newResourceChangeScannerConfiguration();
sconf.setProperty("drools.resource.scanner.interval", "5");
ResourceFactory.getResourceChangeScannerService().configure(sconf);
ResourceFactory.getResourceChangeScannerService().start();
ResourceFactory.getResourceChangeNotifierService().start();

Which works well, but the problem is that is logs to the console way too much:

[2011:10:284 12:10:913:debug] ResourceChangeScanner thread is waiting for 5
[2011:10:284 12:10:915:debug] ResourceChangeScanner attempt to scan 4 resources
[2011:10:284 12:10:915:debug] ResourceChangeScanner scanning directory=[UrlResource path='file:repository/entitlement/static-rules/']
[2011:10:284 12:10:915:debug] ResourceChangeScanner scanning directory=[UrlResource path='file:repository/entitlement/rules/']
[2011:10:284 12:10:915:debug] ResourceChangeScanner thread is waiting for 5
[2011:10:284开发者_StackOverflow中文版 12:10:917:debug] ResourceChangeScanner attempt to scan 4 resources
[2011:10:284 12:10:917:debug] ResourceChangeScanner scanning directory=[UrlResource path='file:repository/entitlement/static-rules/']
[2011:10:284 12:10:917:debug] ResourceChangeScanner scanning directory=[UrlResource p

Every 5 seconds, a new set of lines. Any idea how to quiet it down a bit?


This should do it:

ResourceFactory.getResourceChangeNotifierService().
      setSystemEventListener(new DoNothingSystemEventListener());

BTW this is the default listener, don't know why org.drools.agent.impl.PrintStreamSystemEventListener is picked up in your case.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜