title: log4j trying to log in the file
body: <p>I am trying to use log4j to log it in the file
  here's the code</p>
  
  <pre><code>    protected static Logger logger = Logger.getLogger(Application.class);
      private static final String DIRECTORY = "/Users/me/Desktop";
      private static final String EXTENSION = ".log";
  
      protected void setupLogger(String fileName) {
          SimpleLayout layout = new SimpleLayout();
          FileAppender appender = new FileAppender(layout, DIRECTORY + "/logs/" + fileName + EXTENSION, false);
          logger.addAppender(appender);
          logger.setLevel((Level) Level.DEBUG);
      }
  </code></pre>
  
  <p>and here's the pom that i use <a href="http://pastebin.com/vXdFtzSU" rel="nofollow noreferrer">http://pastebin.com/vXdFtzSU</a></p>
  
  <p>The stacktrace that I am getting is here </p>
  
  <pre><code>Error:(40, 28) java: incompatible types: org.apache.log4j.FileAppender cannot be converted to org.apache.log4j.Appender
  </code></pre>
  
  <p>I am trying to follow this answer <a href="https://stackoverflow.com/questions/1324053/configure-log4j-to-log-to-custom-file-at-runtime">configure log4j to log to custom file at runtime</a></p>