Skip to main content

Posts

Showing posts from July, 2020

How to disable Apache Commons Logging statement in Our Java Application

In recent times, One of the java project applications is started printing apache-commons logs in the application logs. Turns out due to the changes in the migration process. The log4j.xml from the apache-commons is taken into account in the classpath due to that the application logs keep piling up and at some point of time the servers end up with no storage spaces, To disable the Apache commons logs from the Apache commons-logging module. Add the following parameter in the Java args during the server startup. -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog