[logback-dev] [JIRA] Created: (LBCORE-55) getPresentationFooter and getFileFooter are swapped

Natan Cox (JIRA) noreply-jira at qos.ch
Mon Aug 25 13:33:45 CEST 2008


getPresentationFooter and getFileFooter are swapped
---------------------------------------------------

                 Key: LBCORE-55
                 URL: http://jira.qos.ch/browse/LBCORE-55
             Project: logback-core
          Issue Type: Bug
          Components: Appender
            Reporter: Natan Cox
            Assignee: Logback dev list


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);
         }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the logback-dev mailing list