Jordan Jordanovski
Jordan Jordanovski

Reputation: 683

Stop output from drools when starting OptaPlanner from a JAR

How to stop the drools logger when executing OptaPlanner from a compiled JAR?

In the logback.xml file the drools output is commented out and when i run the project directly from Eclipse everything is ok the only output is the one from OptaPlanner (either debug or trace) , but when i compile everything into a JAR and run it from the JAR for some reason i also get the drools output.

Upvotes: 0

Views: 213

Answers (1)

Jordan Jordanovski
Jordan Jordanovski

Reputation: 683

I solved this with turning off the Drools logger through the Java API.

Logger droolsLogger = (Logger) LoggerFactory.getLogger("org.drools");
droolsLogger.setLevel(Level.OFF);

Upvotes: 1

Related Questions