Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-59

HTMLLayout and LayoutWrappingEncoder produces invalid/unusuable output

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • None
    • None
    • Windows Server 2008 R2 64 bit, JDK 1.6.0_26

    Description

      HTMLLayout and LayoutWrappingEncoder are producing unusuable HTML output, the HTML file isn't closed by </table></body></html>. When you are using the append element, a new logging event produces the complete html header, headlines and table header.

      Configuration:
      <appender name="FILE" class="ch.qos.logback.core.FileAppender">
      <file>../../logs/server_nodes.html</file>
      <encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
      <layout class="ch.qos.logback.classic.html.HTMLLayout">
      <pattern>%d

      {ISO8601}

      %msg</pattern>
      </layout>
      </encoder>
      <append>true</append>
      </appender>

      <logger name="file.logger" additivity="false">
      <level value="info" />
      <appender-ref ref="FILE" />
      </logger>

      Attachments

        Activity

          People

            ceki Ceki Gülcü
            jiai Jessica-Aileen Alten
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: