Search code examples
droolslogback

Drools logging with logback


I'm using Drools 5.4.0.Final For logging I'm using logback in my application.

I tried to add update my logback.xml with

<logger name="org.drools" level="debug"/>

But I see nothing in my logs concerning Drools. I would expect to see so my lines of logs concerning the drools initialization.


Solution

  • Drools 5.4.0.Final does not support any logging framework natively. The next version, Drools 5.5.0.Beta1, will. It will also be documented in the manual how to use it. See this issue for more info.

    Drools 5.5.0.Beta1 will log to slf4j-api, so you can logback, log4j, jdk-logging, slf4j-simple, ... You still need to explicitly call KnowledgeRuntimeLoggerFactory.newConsoleLogger() and add that to the event listeners.