title: Logfile lost when using Log4J/GWT under Tomcat
body: <p>I have create a fresh new GWT 2.6.0 project with</p>
  
  <pre><code>webappcreator -out TestLog4J com.example.testlog4j
  </code></pre>
  
  <p>I import it into Eclipse using "Import existing project.."</p>
  
  <p>I copy log4j-api-2.0.1.jar and log4j-core-2.0.1.jar to TestLog4J/war/WEB-INF/lib (directory has to be created first) and add them to the build path.</p>
  
  <p>I then create log4j2.xml in WEB-INF/lib  (right place?)</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
  &lt;Configuration status="trace" monitorInterval="30"&gt;
  
  &lt;Appenders&gt;
      &lt;File name="Test" fileName="test.log"&gt;
          &lt;PatternLayout&gt;
              &lt;Pattern&gt;%d %p %c{1} [%t] %m%n&lt;/Pattern&gt;
          &lt;/PatternLayout&gt;
      &lt;/File&gt;
  &lt;/Appenders&gt;
  
  &lt;Loggers&gt;
      &lt;Root level="trace"&gt;
          &lt;AppenderRef ref="Test" /&gt;
      &lt;/Root&gt;
  &lt;/Loggers&gt;
  
  &lt;/Configuration&gt;
  </code></pre>
  
  <p>In GreetingServiceImpl, I add:</p>
  
  <pre><code>import org.apache.logging.log4j.LogManager;
  import org.apache.logging.log4j.Logger;
  </code></pre>
  
  <p>and in the class</p>
  
  <pre><code>Logger  logger  = LogManager.getLogger(getClass());
  </code></pre>
  
  <p>and in the method greetServer</p>
  
  <pre><code>logger.info("xxxxxxx TEST MESSAGE xxxxxxxx);");
  </code></pre>
  
  <p>I build in the TestLog4J dir using</p>
  
  <pre><code>ant war
  </code></pre>
  
  <p>and I load and deploy the WAR file into Tomcat using webpage at localhost:8080</p>
  
  <p>Now I run the app, but where is the test.log file ???  I can't find it anywhere?</p>
  
  <p>Is there anything wrong with the code above?</p>