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

getPresentationFooter and getFileFooter are swapped

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: logback-core
    • Labels:
      None

      Description

      If I look into the code I can see in WriterAppender writeFooter

      String h = layout.getFileFooter();
      if ((h != null) && (this.writer != null)) {
      try {
      this.writer.write(h);
      String pf = layout.getPresentationFooter();
      if (pf != null)

      { this.writer.write(pf); }

      And if I look into HTMLLayoutBase I see

      getFileFooter => </body></html>
      getPresentationFooter => </table>

      which means we are first closing the HTML and then the TABLE?

      Fix:

      String pf = layout.getPresentationFooter();
      if ((pf != null) && (this.writer != null)) {
      try {
      this.writer.write(pf);
      String h = layout.getFileFooter();
      if (h != null)

      { this.writer.write(h); }

        Attachments

          Activity

            People

            • Assignee:
              logback-dev Logback dev list
              Reporter:
              natan.cox Natan Cox
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: