title: Configure Wiremock to use log4j with a Custom Transformer
body: <p>I'm running Wiremock as a Standalone process (v2.5.1). I've created a Java custom transformer by extending: <strong>com.github.tomakehurst.wiremock.extension.ResponseTransformer</strong></p>
  
  <p>My custom transformer then uses some other common code that uses Log4J for logging. With code like:</p>
  
  <p><code>import org.apache.log4j.Logger;
   private static Logger logger = Logger.getLogger(CommonCode.class);
   ...
   logger.error("This is some error");</code></p>
  
  <p>Is there anyway I can configure Wiremock to output this custom logging? I've tried putting a log4j.xml and log4j.properties file in the classpath. Here's an example of a properties file:</p>
  
  <pre><code>log4j.appender.CUSTOMAPPENDER=org.apache.log4j.RollingFileAppender
  log4j.appender.CUSTOMAPPENDER.File=c:/WireMock/logs/custom.log
  log4j.appender.CUSTOMAPPENDER.layout=org.apache.log4j.PatternLayout
  
  log4j.logger.com.myorg=DEBUG, CUSTOMAPPENDER
  </code></pre>
  
  <p>The equivalent log4j.xml file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"&gt;
  &lt;log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"&gt;
      &lt;appender name="CUSTOMAPPENDER" class="org.apache.log4j.DailyRollingFileAppender"&gt;
          &lt;param name="file" value="C:/WireMock/logs/custom.log"/&gt;
          &lt;param name="datePattern" value="'.'yyyy-MM-dd"/&gt;
          &lt;param name="append" value="true"/&gt;
          &lt;layout class="org.apache.log4j.PatternLayout"&gt;
              &lt;param name="ConversionPattern" value="%d{MMM dd HH:mm:ss}] [%r] %5p [%t] (%F:%L) - %m%n"/&gt;
          &lt;/layout&gt;
      &lt;/appender&gt;
      &lt;logger name="com.myorg" additivity="false"&gt;
          &lt;level value="DEBUG"/&gt;
          &lt;appender-ref ref="CUSTOMAPPENDER"/&gt;
      &lt;/logger&gt;   
  &lt;/log4j:configuration&gt;
  </code></pre>
  
  <p>I also have the following JARs in my classpath:</p>
  
  <ul>
  <li>log4j-1.2.17.jar</li>
  <li>slf4j-api-1.7.2.jar</li>
  <li>slf4j-log4j12-1.7.2.jar</li>
  </ul>
  
  <p>I'd like this custom logging to go to a separate log file from the Default Wiremock verbose logging. Any help would be appreciated.</p>