I think you mean:<br><br><span style="font-family:'courier new',monospace;line-height:19.7999992370605px">if (((invocationCounter++) % mask) == 0) {</span><br><div><span style="font-family:'courier new',monospace;line-height:19.7999992370605px"><br></span></div><div><span style="line-height:19.7999992370605px">Otherwise it will enter the block 15 out of 16 times (assuming the default mask value of 16).</span><br></div><div><span style="line-height:19.7999992370605px"> (*Chris*)</span></div><br><div class="gmail_quote">On Tue Dec 02 2014 at 1:44:44 PM Johanes Soetanto <<a href="mailto:otnateos@gmail.com">otnateos@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:'courier new',monospace">Quoting the doc </div><div class="gmail_default" style="font-family:'courier new',monospace"><br></div><div class="gmail_default" style="font-family:'courier new',monospace">"<span style="font-family:arial">In
order to improve performance,
</span><code>ReconfigureOnChangeFilter</code><span style="font-family:arial"> is in reality "alive" only
once every </span><em style="font-family:arial">N</em><span style="font-family:arial"> logging operations. Depending on how often
your application logs, the value of </span><em style="font-family:arial">N</em><span style="font-family:arial"> can be modified on
the fly by logback. By default N is 16, although it can go as high
as 2^16 (= 65536) for CPU-intensive applications.</span></div>
<p>In short, when a configuration file changes, it will be
automatically reloaded but only after several logger invocations
<em>and</em> after a delay determined by the scanning period.</p><div class="gmail_default" style="font-family:'courier new',monospace;display:inline">"</div><p></p><p></p><div class="gmail_default" style="font-family:'courier new',monospace;display:inline">Correct me if i'm wrong, if the check happens ever N log operation, shouldn't it use modulus instead of masking for the check?</div><p></p><p></p><div class="gmail_default" style="font-family:'courier new',monospace;display:inline">e.g.</div><p></p><p></p><div class="gmail_default" style="font-family:'courier new',monospace;display:inline">if (((invocationCounter++) % mask) != 0) {</div><p></p><p></p><div class="gmail_default" style="font-family:'courier new',monospace;display:inline"><br></div><p></p><p></p><div class="gmail_default" style="font-family:'courier new',monospace;display:inline">Thanks,</div> <p></p><div class="gmail_extra"><br clear="all"><div><div>Johanes</div></div>
<br><div class="gmail_quote">On 2 December 2014 at 22:00, <span dir="ltr"><<a href="mailto:logback-user-request@qos.ch" target="_blank">logback-user-request@qos.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="gmail_default" style="font-family:'courier new',monospace;display:inline"></div><br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Tue, 2 Dec 2014 17:05:05 +1100</blockquote></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
From: Johanes Soetanto <<a href="mailto:otnateos@gmail.com" target="_blank">otnateos@gmail.com</a>><br>
To: <a href="mailto:logback-user@qos.ch" target="_blank">logback-user@qos.ch</a><br>
Subject: <div class="gmail_default" style="font-family:'courier new',monospace;display:inline"></div>Re: [logback-user] logback.xml not reloaded<br>
Message-ID:<br></blockquote></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<<a href="mailto:CAHn_Lrwmbson%2Bn4zrRwHNQkEL-ch3BUGE5VvFMyykmnAwmqMHA@mail.gmail.com" target="_blank">CAHn_Lrwmbson+n4zrRwHNQkEL-ch3BUGE5VvFMyykmnAwmqMHA@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"</blockquote></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
<br>
Finally I manage to get a time to debug the app. Looking<br>
into ReconfigureOnChangeFilter (version 1.0.13) , the execution is stopped<br>
by line #108 where the mask is always set to 65535 .<br>
<br>
I'm clueless on how to change the mask as it seems like it is being managed<br>
automatically by updateMaskIfNecessary (line #147) . I believe it was added<br>
for optimization, but with mask value of 65535, it will be a while for the<br>
configuration to be loaded even though i set my configuration to be scanned<br>
every 200 seconds.<br>
<br>
Any hint how to fix this? Thanks,<br>
<br>
Johanes<br>
<br>
<br>
><br>
> Message: 1<br>
> Date: Wed, 12 Nov 2014 12:10:38 +1100<br>
> From: Johanes Soetanto <<a href="mailto:otnateos@gmail.com" target="_blank">otnateos@gmail.com</a>><br>
> To: <a href="mailto:logback-user@qos.ch" target="_blank">logback-user@qos.ch</a><br>
> Subject: Re: [logback-user] logback.xml not reloaded<br>
> Message-ID:<br>
> <CAHn_LrykvJuj=UF4=-YhoW+QdUb2y+iHKS9u=5wT5D=<br>
> <a href="mailto:dCv8uNA@mail.gmail.com" target="_blank">dCv8uNA@mail.gmail.com</a>><br>
> Content-Type: text/plain; charset="utf-8"<br>
><br>
> Upon my investigation, it seems like my problem with reloading is related<br>
> to the change made in version 1.0.2 (<a href="http://jira.qos.ch/browse/LOGBACK-327" target="_blank">http://jira.qos.ch/browse/LOGBACK-327</a><br>
> ).<br>
><br>
> I tested with version 1.0.1 or 1.1.2 the configuration is not reloaded when<br>
> there is change.<br>
><br>
><br>
> Note: I haven't run the app on debug mode.<br>
><br>
> Johanes<br>
><br>
> ><br>
> > Message: 4<br>
> > Date: Tue, 4 Nov 2014 10:01:11 +0000<br>
> > From: David Roussel <<a href="mailto:nabble@diroussel.xsmail.com" target="_blank">nabble@diroussel.xsmail.com</a>><br>
> > To: logback users list <<a href="mailto:logback-user@qos.ch" target="_blank">logback-user@qos.ch</a>><br>
> > Subject:<br>
> Re: [logback-user] logback.xml not reloaded<br>
> > Message-ID:<br>
> > <<a href="mailto:EEBB841D-A28F-4616-80CD-83E3A326CF70@diroussel.xsmail.com" target="_blank">EEBB841D-A28F-4616-80CD-83E3A326CF70@diroussel.xsmail.com</a>><br>
> > Content-Type: text/plain; charset="us-ascii"<br>
> ><br>
> > My only suggestion is running it in a debugging session in your IDE and<br>
> > seeing what is happening that way.<br>
> ><br>
> > David<br>
> ><br>
> > > On 4 Nov 2014, at 07:34, Johanes Soetanto <<a href="mailto:otnateos@gmail.com" target="_blank">otnateos@gmail.com</a>> wrote:<br>
> > ><br>
> > > Hi there,<br>
> > ><br>
> > > I would like to know if there is a way to debug why logback.xml<br>
> > configuration change cannot be reloaded by our application. It had been<br>
> > working correctly on our application for a long time, however I discover<br>
> > from a week ago that change at runtime is not applied. If i restart the<br>
> > application, the change is applied properly. configuration xml is using<br>
> > basic one using scan="true".<br>
> > ><br>
> > > I tried adding debug="true" but no information message apart from usual<br>
> > logback information message before application startup. The only change I<br>
> > can think of is we change Tomcat from 6.0.x to 7.0.56. We are using<br>
> logback<br>
> > version 1.0.13.<br>
> > ><br>
> > > Any assistance is appreciated.<br>
> > ><br>
> > > Thanks<br>
> > ><br>
> > > Johanes<br>
> > ><br></blockquote></div></div></div>
______________________________<u></u>_________________<br>
Logback-user mailing list<br>
<a href="mailto:Logback-user@qos.ch" target="_blank">Logback-user@qos.ch</a><br>
<a href="http://mailman.qos.ch/mailman/listinfo/logback-user" target="_blank">http://mailman.qos.ch/mailman/<u></u>listinfo/logback-user</a></blockquote></div>