title: Adding an Appender does not work
body: <p>I am trying to get an logger and add a specific appender to it. My code is very simple but I am not sure how to get this working.</p>
  
  <pre><code>val loggerInstance = LoggerFactory.getLogger("FOO.class")
  var fileAppender =  new FileAppender()
  // fileAppender .setFile , sietPattern etc..the parameters i want
  loggerInstance.addAppender(fileAppender) 
  </code></pre>
  
  <p>I get an error here</p>
  
  <pre><code>Multiple markers at this line
  - type mismatch; found : ch.qos.logback.core.FileAppender[Nothing] required: 
       ch.qos.logback.core.Appender[ch.qos.logback.classic.spi.ILoggingEvent] Note: Nothing &lt;: 
       ch.qos.logback.classic.spi.ILoggingEvent, but Java-defined trait Appender is invariant in type E. You may wish to investigate a 
       wildcard type such as `_ &lt;: ch.qos.logback.classic.spi.ILoggingEvent`. (SLS 3.2.10)
      - Line breakpoint:loggerchange [line: 76] - addAppender
  </code></pre>
  
  <p>I have no clue what this error means and how to solve it. Can someone help me?</p>
  
  <p>EDIT : </p>
  
  <p>I tried to do what was told by drexin. I was not able to extend the interface and define the functions . There were only three functions , setName,getName, and doAppend. i am not sure as how to define these functions. Meanwhile i tried something and removed the errors. Please look into the code and let me know if what i am doing makes any sense .                                                                                                                                                                             </p>
  
  <pre><code>val encoder = new PatternLayoutEncoder()
  encoder2.setContext(context)
  encoder2.setPattern("%msg%")    
  fileAppender.setAppend(true)
  fileAppender.setContext(context)
  fileAppender.setEncoder(encoder2.asInstanceOf[Encoder[Nothing]])
  
  loggerInstance.asInstanceOf[Logger].addAppender(fileAppender
  .asInstanceOf[Appender[ILoggingEvent]])
  </code></pre>
  
  <p>I know using asInstanceOf is not a smart way of coding but for now i want to make this work . When i execute this code i am getting the file in which i want to log but there is no logs inside it. I have checked for level errors , but that's not the case. i believe there is something wrong with encoder/layout. I am not sure how to fix it. Can someone show me how to either extend the class and apply the functions or what is wrong in this new code .</p>