title: Conditional Logging in Log4J
body: <p>I have a Java Maven project which contains 3 modules, say: A, B, C.</p>
  
  <pre><code>-----pom.xml
    |
    |--A
    |
    |--B
    |
    |--C
  </code></pre>
  
  <p>Module C is a library that is used by both A and B.</p>
  
  <p>Inside module C, there are some log4j logging lines like:</p>
  
  <pre><code>  log.info("My log here");
  </code></pre>
  
  <p>This log will be produced if the method that contains it is called.</p>
  
  <p>However, I want to be able to configure log4j so that these logs are only produced by module A but not module B.</p>
  
  <p>Is this something possible?</p>