title: Log4j2 (beta9) How to configure custom layout for FileAppender?
body: <p>Can someone tell me, How to configure custom layout for FileAppender?</p>
  
  <p>Can anyone tell me, how to configure custom layout for FileAppender?
  I'm created copy of HTMLLayout and made some changes there (it's cannot be extends because it's final class) and now I want use this layout, but I don't know how  :(</p>
  
  <p>This error is showed with bellow listed configuration:
  ERROR File contains an invalid element or attribute "ibtrader.log4j2.MYHTMLLayout"</p>
  
  <p>Here is my log4j2.xml configuration file</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;configuration strict="true" monitorInterval="30"&gt;
    &lt;appenders&gt;   
      &lt;appender name="Console" type="Console" target="SYSTEM_OUT"&gt;
          &lt;layout type="PatternLayout"  pattern="%highlight{%d{ISO8601} [%t] %-5level %logger{36} - %msg%n}" /&gt;
      &lt;/appender&gt;        
      &lt;appender name="DEBUG_FILE" type="File" fileName="logs/errors.txt" &gt;
          &lt;layout type="PatternLayout" pattern="%d{ISO8601} [%t] %-5level %logger{36} - %msg%n}" /&gt;
      &lt;/appender&gt;
      &lt;appender name="HTMLAppender" type="File" fileName="logs/mainlog.html"&gt;
          &lt;layout type="ibtrader.log4j2.MYHTMLLayout" charset="UTF-8" title="IBTRader logs" locationInfo="true" /&gt;
      &lt;/appender&gt;        
    &lt;/appenders&gt;
    &lt;loggers&gt;
     &lt;root level="trace"&gt;
      &lt;appender-ref ref="Console"/&gt;
      &lt;appender-ref ref="DEBUG_FILE" level="WARN" /&gt;   
      &lt;appender-ref ref="HTMLAppender" /&gt; 
     &lt;/root&gt;
    &lt;/loggers&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>Thanks for help!</p>