title: log4j linux issue - log file is empty
body: <p>Initial config file:</p>
  
  <pre><code>log4j.rootLogger=WARN, stdout
  log4j.appender.stdout=org.apache.log4j.ConsoleAppender
  log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
  log4j.appender.stdout.layout.ConversionPattern=&lt;%p&gt; %d{dd-MM-yyyy HH:mm:ss} %m%n
  log4j.appender.stdout.Threshold=DEBUG
  </code></pre>
  
  <p>later its confligured to output logs to runtime-specified location:</p>
  
  <pre><code>private static Logger configureLogger(ConflictsCheckerArgs dataModel) {
      Logger logger = Logger.getLogger(ApplicationController.class);
  
      FileAppender newAppender = new FileAppender();
      newAppender.setFile(new File(dataModel.getOutputPath(), "logs.log").getPath());
      newAppender.setName("logsToFile");
      newAppender.setLayout(new PatternLayout("%d %-5p [%c{1}] %m%n"));
      newAppender.setThreshold(Level.INFO);
      newAppender.setAppend(true);
      newAppender.activateOptions();
  
      Logger.getRootLogger().addAppender(newAppender);
  
      return logger;
  }
  </code></pre>
  
  <p>Problem is, that this file is created, but it's empty. I assume, that in jar's/target  location program does not have write-access and maybe log4j try to do something there and that stops it from working at all. Do you have any ideas how to fix this problem - how to have logs in that log file in place of empty file?</p>
  
  <p>Worth to add is that every other "normal" files, that are meant to be put into output directory, are there and they are perfectly fine.</p>