title: Where I have to put the file for using file appender log4j2
body: <p>I am new to stackoverflow.
  I am trying to set up log4j2 in my maven web application and I want to use file appender. I found examples showing like that..</p>
  
  <pre><code>&lt;File name="MyFile" fileName="logs/app.log"&gt;      
  &lt;PatternLayout&gt; 
  &lt;pattern&gt;%d %p %C{1.} [%t] %m%n&lt;/pattern&gt;
  &lt;/PatternLayout&gt;
  &lt;/File&gt;
  </code></pre>
  
  <p>So. I create a folder "logs" and put app.log inside somewhere in my application. But log data are not written to the file.</p>
  
  <p>When I change to write in console for testing purpose, I can see the log data in console.</p>
  
  <p>I am not so sure where I have to put that "logs" folder. </p>
  
  <p>My application directory is like that</p>
  
  <pre><code>src/main/java
  src/main/resources
  src/main/webapp
  src/test/java
  </code></pre>
  
  <p>Thanks for your help.</p>