<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:x="urn:schemas-microsoft-com:office:excel" 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 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Helv;
        panose-1:2 11 6 4 2 2 2 3 2 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@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:0in;
        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.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
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><span style='color:#1F497D'>Hello,<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Trying the logback file appender and all went well until I created the Rolling and Triggering policies. <o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>I’m following the examples in Chapter 4, so not sure how can this be wrong.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>The errors and the logback.xml are below:<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:black'>16:13:23,158 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@25:78 - no applicable action for [rollingPolicy], current pattern is [[configuration][appender][rollingPolicy]]</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'>16:13:23,158 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@26:24 - no applicable action for [fileNamePattern], current pattern is [[configuration][appender][rollingPolicy][fileNamePattern]]</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'>16:13:23,159 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@27:17 - no applicable action for [minIndex], current pattern is [[configuration][appender][rollingPolicy][minIndex]]</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'>16:13:23,159 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@28:17 - no applicable action for [maxIndex], current pattern is [[configuration][appender][rollingPolicy][maxIndex]]</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'>16:13:23,159 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@31:85 - no applicable action for [triggeringPolicy], current pattern is [[configuration][appender][triggeringPolicy]]</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'>16:13:23,160 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@32:20 - no applicable action for [maxFileSize], current pattern is [[configuration][appender][triggeringPolicy][maxFileSize]]</span><span style='font-size:10.0pt;font-family:Consolas'><o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:Consolas;color:teal'><</span><span style='font-size:10.0pt;font-family:Consolas;color:#3F7F7F;background:silver;mso-highlight:silver'>configuration</span><span style='font-size:10.0pt;font-family:Consolas;color:teal'>></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:teal'><</span><span style='font-size:10.0pt;font-family:Consolas;color:#3F7F7F'>contextName</span><span style='font-size:10.0pt;font-family:Consolas;color:teal'>></span><span style='font-size:10.0pt;font-family:Consolas;color:black'>Test</span><span style='font-size:10.0pt;font-family:Consolas;color:teal'></</span><span style='font-size:10.0pt;font-family:Consolas;color:#3F7F7F'>contextName</span><span style='font-size:10.0pt;font-family:Consolas;color:teal'>></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:teal'><</span><span style='font-size:10.0pt;font-family:Consolas;color:#3F7F7F'>appender</span><span style='font-size:10.0pt;font-family:Consolas'> <span style='color:#7F007F'>name</span><span style='color:black'>=</span><i><span style='color:#2A00FF'>"FILE"</span></i> <span style='color:#7F007F'>class</span><span style='color:black'>=</span><i><span style='color:#2A00FF'>"ch.qos.logback.core.FileAppender"</span></i><span style='color:teal'>></span><span style='color:black'>  </span><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:teal'><</span><span style='font-size:10.0pt;font-family:Consolas;color:#3F7F7F'>file</span><span style='font-size:10.0pt;font-family:Consolas;color:teal'>></span><span style='font-size:10.0pt;font-family:Consolas;color:black'>${JBOSS_HOME}/server/default/log/myApp.log</span><span style='font-size:10.0pt;font-family:Consolas;color:teal'></</span><span style='font-size:10.0pt;font-family:Consolas;color:#3F7F7F'>file</span><span style='font-size:10.0pt;font-family:Consolas;color:teal'>></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:teal'><</span><span style='font-size:10.0pt;font-family:Consolas;color:#3F7F7F'>rollingPolicy</span><span style='font-size:10.0pt;font-family:Consolas'> <span style='color:#7F007F'>class</span><span style='color:black'>=</span><i><span style='color:#2A00FF'>"ch.qos.logback.core.rolling.FixedWindowRollingPolicy"</span></i><span style='color:teal'>></span><span style='color:black'> </span><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:teal'><</span><span style='font-size:10.0pt;font-family:Consolas;color:#3F7F7F'>fileNamePattern</span><span style='font-size:10.0pt;font-family:Consolas;color:teal'>></span><span style='font-size:10.0pt;font-family:Consolas;color:black'>myApp.%i.log</span><span style='font-size:10.0pt;font-family:Consolas;color:teal'></</span><span style='font-size:10.0pt;font-family:Consolas;color:#3F7F7F'>fileNamePattern</span><span style='font-size:10.0pt;font-family:Consolas;color:teal'>></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:teal'><</span><span style='font-size:10.0pt;font-family:Consolas;color:#3F7F7F'>minIndex</span><span style='font-size:10.0pt;font-family:Consolas;color:teal'>></span><span style='font-size:10.0pt;font-family:Consolas;color:black'>1</span><span style='font-size:10.0pt;font-family:Consolas;color:teal'></</span><span style='font-size:10.0pt;font-family:Consolas;color:#3F7F7F'>minIndex</span><span style='font-size:10.0pt;font-family:Consolas;color:teal'>></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:teal'><</span><span style='font-size:10.0pt;font-family:Consolas;color:#3F7F7F'>maxIndex</span><span style='font-size:10.0pt;font-family:Consolas;color:teal'>></span><span style='font-size:10.0pt;font-family:Consolas;color:black'>5</span><span style='font-size:10.0pt;font-family:Consolas;color:teal'></</span><span style='font-size:10.0pt;font-family:Consolas;color:#3F7F7F'>maxIndex</span><span style='font-size:10.0pt;font-family:Consolas;color:teal'>></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:teal'></</span><span style='font-size:10.0pt;font-family:Consolas;color:#3F7F7F'>rollingPolicy</span><span style='font-size:10.0pt;font-family:Consolas;color:teal'>></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'>    </span><span style='font-size:10.0pt;font-family:Consolas;color:teal'><</span><span style='font-size:10.0pt;font-family:Consolas;color:#3F7F7F'>triggeringPolicy</span><span style='font-size:10.0pt;font-family:Consolas'> <span style='color:#7F007F'>class</span><span style='color:black'>=</span><i><span style='color:#2A00FF'>"ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"</span></i><span style='color:teal'>></span><span style='color:black'> </span><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:teal'><</span><span style='font-size:10.0pt;font-family:Consolas;color:#3F7F7F'>maxFileSize</span><span style='font-size:10.0pt;font-family:Consolas;color:teal'>></span><span style='font-size:10.0pt;font-family:Consolas;color:black'>1KB</span><span style='font-size:10.0pt;font-family:Consolas;color:teal'></</span><span style='font-size:10.0pt;font-family:Consolas;color:#3F7F7F'>maxFileSize</span><span style='font-size:10.0pt;font-family:Consolas;color:teal'>></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:teal'></</span><span style='font-size:10.0pt;font-family:Consolas;color:#3F7F7F'>triggeringPolicy</span><span style='font-size:10.0pt;font-family:Consolas;color:teal'>></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'>     </span><span style='font-size:10.0pt;font-family:Consolas;color:teal'><</span><span style='font-size:10.0pt;font-family:Consolas;color:#3F7F7F'>encoder</span><span style='font-size:10.0pt;font-family:Consolas;color:teal'>></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:teal'><</span><span style='font-size:10.0pt;font-family:Consolas;color:#3F7F7F'>pattern</span><span style='font-size:10.0pt;font-family:Consolas;color:teal'>></span><span style='font-size:10.0pt;font-family:Consolas;color:black'>%date %contextName %level [%thread] %logger{36} [%file:%line] %<u>msg</u>%n</span><span style='font-size:10.0pt;font-family:Consolas;color:teal'></</span><span style='font-size:10.0pt;font-family:Consolas;color:#3F7F7F'>pattern</span><span style='font-size:10.0pt;font-family:Consolas;color:teal'>></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:teal'></</span><span style='font-size:10.0pt;font-family:Consolas;color:#3F7F7F'>encoder</span><span style='font-size:10.0pt;font-family:Consolas;color:teal'>></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:teal'></</span><span style='font-size:10.0pt;font-family:Consolas;color:#3F7F7F'>appender</span><span style='font-size:10.0pt;font-family:Consolas;color:teal'>></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'> </span><span style='font-size:10.0pt;font-family:Consolas;color:teal'><</span><span style='font-size:10.0pt;font-family:Consolas;color:#3F7F7F'>logger</span><span style='font-size:10.0pt;font-family:Consolas'> <span style='color:#7F007F'>name</span><span style='color:black'>=</span><i><span style='color:#2A00FF'>"com.test.logback"</span></i> <span style='color:#7F007F'>level</span><span style='color:black'>=</span><i><span style='color:#2A00FF'>"DEBUG"</span></i> <span style='color:teal'>/></span><span style='color:black'>  </span><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:teal'><</span><span style='font-size:10.0pt;font-family:Consolas;color:#3F7F7F'>root</span><span style='font-size:10.0pt;font-family:Consolas'> <span style='color:#7F007F'>level</span><span style='color:black'>=</span><i><span style='color:#2A00FF'>"debug"</span></i><span style='color:teal'>></span><span style='color:black'> </span><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:teal'><</span><span style='font-size:10.0pt;font-family:Consolas;color:#3F7F7F'>appender-ref</span><span style='font-size:10.0pt;font-family:Consolas'> <span style='color:#7F007F'>ref</span><span style='color:black'>=</span><i><span style='color:#2A00FF'>"FILE"</span></i> <span style='color:teal'>/></span><span style='color:black'> </span><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:teal'><</span><span style='font-size:10.0pt;font-family:Consolas;color:#3F7F7F'>appender-ref</span><span style='font-size:10.0pt;font-family:Consolas'> <span style='color:#7F007F'>ref</span><span style='color:black'>=</span><i><span style='color:#2A00FF'>"STDOUT"</span></i> <span style='color:teal'>/></span><span style='color:black'> </span><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:teal'></</span><span style='font-size:10.0pt;font-family:Consolas;color:#3F7F7F'>root</span><span style='font-size:10.0pt;font-family:Consolas;color:teal'>></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><span style='font-size:10.0pt;font-family:Consolas;color:teal'></</span><span style='font-size:10.0pt;font-family:Consolas;color:#3F7F7F;background:silver;mso-highlight:silver'>configuration</span><span style='font-size:10.0pt;font-family:Consolas;color:teal'>></span><span style='color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><div><p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;font-family:"Helv","sans-serif";color:black'>Nadia </span><span style='font-size:10.0pt;font-family:"Helv","sans-serif";color:black'><o:p></o:p></span></p></div><p class=MsoNormal><o:p> </o:p></p></div></body></html>