<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.E-MailFormatvorlage17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>Dear all,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I have a question to HTMLLayout. <o:p></o:p></p><p class=MsoNormal>I have written the following code: <o:p></o:p></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>           <u>LayoutWrappingEncoder</u> htmlEncoder = </span><b><span style='font-size:10.0pt;font-family:Consolas;color:#7F0055'>new</span></b><span style='font-size:10.0pt;font-family:Consolas;color:black'> <u>LayoutWrappingEncoder</u>();</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>           HTMLLayout htmlLayout = </span><b><span style='font-size:10.0pt;font-family:Consolas;color:#7F0055'>new</span></b><span style='font-size:10.0pt;font-family:Consolas;color:black'> HTMLLayout();</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>           htmlLayout.setPattern(</span><span style='font-size:10.0pt;font-family:Consolas;color:#2A00FF'>"%relative%thread%mdc%level%logger%msg"</span><span style='font-size:10.0pt;font-family:Consolas;color:black'>);</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>           htmlLayout.start();</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>           htmlEncoder.setContext(</span><span style='font-size:10.0pt;font-family:Consolas;color:#0000C0'>loggerContext</span><span style='font-size:10.0pt;font-family:Consolas;color:black'>);</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>           <u>htmlEncoder.setLayout(htmlLayout)</u>;</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>           htmlEncoder.start();</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>           </span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>           PatternLayoutEncoder encoder = </span><b><span style='font-size:10.0pt;font-family:Consolas;color:#7F0055'>new</span></b><span style='font-size:10.0pt;font-family:Consolas;color:black'> PatternLayoutEncoder();</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>           encoder.setContext(</span><span style='font-size:10.0pt;font-family:Consolas;color:#0000C0'>loggerContext</span><span style='font-size:10.0pt;font-family:Consolas;color:black'>);</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>           encoder.setPattern(</span><span style='font-size:10.0pt;font-family:Consolas;color:#2A00FF'>"%r %thread %level - %msg%n"</span><span style='font-size:10.0pt;font-family:Consolas;color:black'>);</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>           encoder.start();</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>              </span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>              </span><span style='font-size:10.0pt;font-family:Consolas;color:#0000C0'>fileAppender</span><span style='font-size:10.0pt;font-family:Consolas;color:black'>.setContext(</span><b><span style='font-size:10.0pt;font-family:Consolas;color:#7F0055'>this</span></b><span style='font-size:10.0pt;font-family:Consolas;color:black'>.</span><span style='font-size:10.0pt;font-family:Consolas;color:#0000C0'>loggerContext</span><span style='font-size:10.0pt;font-family:Consolas;color:black'>);</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>           </span><span style='font-size:10.0pt;font-family:Consolas;color:#0000C0'>fileAppender</span><span style='font-size:10.0pt;font-family:Consolas;color:black'>.setFile(FilenameUtils.<i>concat</i>(storeLocation, </span><span style='font-size:10.0pt;font-family:Consolas;color:#2A00FF'>"logFile.log.html"</span><span style='font-size:10.0pt;font-family:Consolas;color:black'>));</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>           </span><span style='font-size:10.0pt;font-family:Consolas;color:#0000C0'>fileAppender</span><span style='font-size:10.0pt;font-family:Consolas;color:black'>.setName(</span><span style='font-size:10.0pt;font-family:Consolas;color:#2A00FF'>"File Validation Log"</span><span style='font-size:10.0pt;font-family:Consolas;color:black'>);</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>           </span><span style='font-size:10.0pt;font-family:Consolas;color:#0000C0'>fileAppender</span><span style='font-size:10.0pt;font-family:Consolas;color:black'>.setEncoder(<u>htmlEncoder</u>);</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>           </span><span style='font-size:10.0pt;font-family:Consolas;color:#0000C0'>fileAppender</span><span style='font-size:10.0pt;font-family:Consolas;color:black'>.start();</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>           </span><b><span style='font-size:10.0pt;font-family:Consolas;color:#7F0055'>this</span></b><span style='font-size:10.0pt;font-family:Consolas;color:black'>.</span><span style='font-size:10.0pt;font-family:Consolas;color:#0000C0'>logger</span><span style='font-size:10.0pt;font-family:Consolas;color:black'>.addAppender(</span><span style='font-size:10.0pt;font-family:Consolas;color:#0000C0'>fileAppender</span><span style='font-size:10.0pt;font-family:Consolas;color:black'>);</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>           </span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>           StatusPrinter.<i>print</i>(</span><span style='font-size:10.0pt;font-family:Consolas;color:#0000C0'>loggerContext</span><span style='font-size:10.0pt;font-family:Consolas;color:black'>);</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>But it does not log anything. It creates a html file but only includes the header line. <o:p></o:p></p><p class=MsoNormal>Using the “encoder” it works fine. <o:p></o:p></p><p class=MsoNormal>I don’t want to use Logfiles and do this programmatically. <o:p></o:p></p><p class=MsoNormal>Can anyone give me a hint what is wrong here?<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Best regards,<o:p></o:p></p><p class=MsoNormal>Michael<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>