Jahia 7.3 Jahia 8 Legacy

Logs from a customer module doesn't appear in the log file

Question

In an custom action in a custom module are some logs added. But this logs never appear. The action is running well (or with error). But no log is visible.

Cause

When not the default provided log API is used (which is part of jahia core), logs could be ignored. The jahia logging is controlled by log4j. All related apis are in the WEB-INF/lib folder. For instance log4j-1.2.17.jar, slf4j-log4j12-1.6.6.jar and slf4j-api-1.6.6.jar. 

Solution

Remove dependencies to other log versions (from your pom.xml of the module). And put the jahia internal versions as a provided version in your pom.xml