title: Setting Logback Appender path programmatically
body: <p>I'm trying to set Logback appender path programmatically. (<a href="http://logback.qos.ch/apidocs/ch/qos/logback/core/rolling/RollingFileAppender.html" rel="noreferrer">RollingFileAppender</a> with FixedWindowRollingPolicy to be exact)</p>
  
  <p>I'm doing this because I want to enable my users to set the log path in a preference dialog (Eclipse RCP)</p>
  
  <p>I've tried something like this, but I doesn't change the log path from what's defined in the configuration file:</p>
  
  <pre><code>Logger logback_logger = (ch.qos.logback.classic.Logger)LoggerFactory
     .getLogger(org.slf4j.Logger.ROOT_LOGGER_NAME);
  RollingFileAppender&lt;ILoggingEvent&gt; rfappender = 
     (RollingFileAppender&lt;ILoggingEvent&gt;)logback_logger.getAppender("FILE");
  rfappender.setFile(newFile);
  FixedWindowRollingPolicy rollingPolicy = 
     (FixedWindowRollingPolicy)rfappender.getRollingPolicy();
  rollingPolicy.setFileNamePattern(newPattern);
  </code></pre>