title: Configure Commons Logging to use a specific Log4J properties file
body: <p>I'm trying to configure Commons Logging to use a specific Log4J properties file by specifying the name of the file in commons-logging.properties however Log4J continues to look for a file named log4j.properties. </p>
  
  <p>It appears that if the Log4J jar is in the class path then the contents of commons-logging.properties is ignored, however if I remove the jar from the class path the commons-logging.properties file is processed and quite rightly throws an error saying "User-specified log class 'org.apache.commons.logging.impl.Log4JLogger' cannot be found or is not useable." so the commons-logging properties file is actually being read.</p>
  
  <p>Both the Commons Logging and Log4J properties files are in the class path directory.</p>
  
  <p>I've got the same problem as is described in <a href="https://stackoverflow.com/questions/1524109/commons-logging-and-log4j-properties-file">commons-logging and log4j properties file</a> but I don't understand the answer where it says.... </p>
  
  <blockquote>
    <p>The file commons-logging.properties is only read from commons logging
    while log4j will look for log4j.configuration in the system
    properties.</p>
  </blockquote>
  
  <p>Also it seems that this answer is contradicting the information in the Commons Logging user guide. The user guide says....</p>
  
  <blockquote>
    <p><strong>log4j.configuration=<em>log4j.properties</em></strong> Use this system property to
    specify the name of a Log4J configuration file. If not specified, the
    default configuration file is log4j.properties.</p>
  </blockquote>
  
  <p>Even though I've specified the name of the Log4J configuration file it is still using the default.</p>
  
  <p>Is it possible to specify the name of the log4j properties file (e.g. log4j-MyApp.properties) from within the commons-logging.properties file or have I misunderstood how the two components interact with each other?</p>