Emi, Can you please post your configuration file?
Thank you, Gary On Tue, Oct 11, 2016 at 9:39 AM, Emi <[email protected]> wrote: > Hi Gary, > > org.apache.logging.log4j.core.layout.HtmlLayout.getHeader() > writes more header bytes before it gets to: > > <body bgcolor="#FFFFFF" topmargin="6" leftmargin="6"> > Looking at the code I do not see how an HTML file written by Log4j 2.7 can > start with a body tag. > > Can you verify that only Log4j 2.7 is on the classpath? > > > All *log* related jars under WEB-INF/lib used to be: > > commons-logging-1.2.jar > log4j-1.2-api-2.3.jar > log4j-api-2.3.jar > log4j-core-2.3.jar > log4j-jcl-2.3.jar > log4j-web-2.3.jar > > > > > (1) Install new jars, WEB-INF/lib now shows: > commons-logging-1.2.jar > log4j-1.2-api-2.7.jar > log4j-api-2.7.jar > log4j-core-2.7.jar > log4j-jcl-2.7.jar > log4j-web-2.7.jar > > > > (2) start tomcat7; log user login; > > debug.html displays correctly as shown below: > > > <html> > <head> > <meta charset="UTF-8"/> > </head> > <body bgcolor="#FFFFFF" topmargin="6" leftmargin="6"> > <hr size="1" noshade="noshade"> > Log session start time Tue Oct 11 12:26:50 EDT 2016<br> > <br> > <table cellspacing="0" cellpadding="4" border="1" bordercolor="#224466" > width="100%"> > <tr> > <th>Time</th> > <th>Thread</th> > <th>Level</th> > <th>Logger</th> > <th>Message</th> > </tr> > > <tr> > <td>30382</td> > <td title="http-bio-8080-exec-9 thread">http-bio-8080-exec-9</td> > <td title="Level"><font color="#339933">DEBUG</font></td> > <td title="ProcessLogin logger">ProcessLogin</td> > <td title="Message">2016-10-11 12:27:12 login successfully</td> > </tr> > > > > > (3) http://hostname:8080/manager/html > Click button "Reload" > > > > (4) login again > > debug.html shows wrong format. "<td>237137</td>" is not shown under > table anymore. > > Here is the html contents: > > <html> > <head> > <meta charset="UTF-8"/> > <title>login_out_info</title> > <style type="text/css"> > </style> > </head> > <body bgcolor="#FFFFFF" topmargin="6" leftmargin="6"> > <hr size="1" noshade="noshade"> > Log session start time Tue Oct 11 12:26:50 EDT 2016<br> > <br> > <table cellspacing="0" cellpadding="4" border="1" bordercolor="#224466" > width="100%"> > <tr> > <th>Time</th> > <th>Thread</th> > <th>Level</th> > <th>Logger</th> > <th>Message</th> > </tr> > > <tr> > <td>30382</td> > <td title="http-bio-8080-exec-9 thread">http-bio-8080-exec-9</td> > <td title="Level"><font color="#339933">DEBUG</font></td> > <td title="ProcessLogin logger">ProcessLogin</td> > <td title="Message">2016-10-11 12:27:12 login successfully</td> > </tr> > > </table> > <br> > </body></html> > > <tr> > <td>237137</td> > <td title="http-bio-8080-exec-2 thread">http-bio-8080-exec-2</td> > <td title="Level"><font color="#339933">DEBUG</font></td> > <td title="ProcessLogin logger">ProcessLogin</td> > <td title="Message">2016-10-11 12:30:39 login successfully</td> > </tr> > > ================================================== > > "</table><br></body></html>" is added, but there is no <table> for > <TR><TD>237137.... > > Any help? > > Thanks a lot! > -- E-Mail: [email protected] | [email protected] Java Persistence with Hibernate, Second Edition <https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459> JUnit in Action, Second Edition <https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418"> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021> Spring Batch in Action <https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode={{linkCode}}&tag=garygregory-20&linkId={{link_id}}">Spring Batch in Action> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951> Blog: http://garygregory.wordpress.com Home: http://garygregory.com/ Tweet! http://twitter.com/GaryGregory
