How to disable a java logging class

AEM 6.0 doesn’t allow to disable a particular JAVA Class logger inside the web console log support (/system/console/slinglog), but it is possible via Felix configuration file.

First of all, you have to create a file with the following name under the /apps/<project_dir>/config directory : org.apache.sling.commons.log.LogManager.factory.config-OFF.config. The ‘off’ suffix could be a random word, but I suggest that it should describe the functionality (i.e: org.apache.sling.commons.log.LogManager.factory.config-myClassLoggerOFF.config).

The file content should be something like :

Some explanations :

  • org.apache.sling.commons.log.names : is an array of java class
  • org.apache.sling.commons.log.file : your log file
  • org.apache.sling.commons.log.level : log level

 

Leave a Reply