<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:10pt"><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;">Ceki said:<br><br>&gt;Perhaps the cleanest solution is to trigger reloading of the config file <br>&gt;manually via some convenient (graphical?) user interface.<br><br>I wrote a really nice ajax based graphical UI for log4j recently for a client that does all that.&nbsp; <br>It worked out so well, I've been toying of the idea of making an open source one for logback.<br>I prefer logback for my own open source projects.&nbsp; If there is significant interest in this I might consider doing this and either contributing to logback or open sourcing it on my own...<br><br><span>PS. Ceki, I have yet another open source library that is now dependent on SLF4J (see <a target="_blank" href="http://jabsorb.org">http://jabsorb.org</a>) - nice if you
 could add that to the main SLF4J page.</span><br><br>Cheers<br><br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Original Message ----<br>From: Ceki Gulcu &lt;ceki@qos.ch&gt;<br>To: logback users list &lt;logback-user@qos.ch&gt;<br>Sent: Thursday, September 27, 2007 2:31:37 PM<br>Subject: Re: [logback-user]  RE: [logback-user] logback initialization "à  la"  Spring<br><br><div>Hello,<br><br>Because it dispenses with the need of a separate watchdog thread, I believe that <br>the approach discussed here has significant merit.<br><br>It could be placed into a custom TurboFilter. TurboFilters get called very early <br>in the processing of a log statement. In other words, they get called every <br>time, regardless of the level of the logger in question.<br><br>The if(now &gt; nextCheckStamp) check should avoid superfluous access to the <br>configuration file. Of course, the value of "now" would need to be
 computed anew <br>for each log statement.<br><br>Preliminary tests show that a call to System.currentTimeMillis() costs about 70 <br>nanoseconds. Admittedly, 70 nanoseconds is not much but when compared to the <br>cost of a disabled log statement (10 nanoseconds), it becomes an non-negligible <br>issue.<br><br>In short, the approach is promising, with a small but non-negligible <br>computational cost.<br><br>Perhaps the cleanest solution is to trigger reloading of the config file <br>manually via some convenient (graphical?) user interface.<br><br>Arthur Blake wrote:<br>&gt; Probably one objection to this scheme would be an extra overhead on each <br>&gt; and every log message-- if you really look into it though, this overhead <br>&gt; is really really minor-<br>&gt; I think if implemented correctly, it would amount to just an extra long <br>&gt; comparison on each log message. <br>&gt; e.g. <br>&gt; <br>&gt; if (now &gt; nextCheckTstamp)<br>&gt;
 {<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;// kick off async file check<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;// and then update nextCheckTstamp<br>&gt; }<br>&gt; <br>&gt; Where "now" is a variable that you presumably would already have around <br>&gt; anyway...<br>&gt; <br>&gt; <br>&gt; ----- Original Message ----<br>&gt; From: Arthur Blake &lt;blakesys@yahoo.com&gt;<br>&gt; To: logback users list &lt;logback-user@qos.ch&gt;<br>&gt; Sent: Thursday, September 27, 2007 1:11:04 PM<br>&gt; Subject: Re: [logback-user] RE: [logback-user] logback initialization "à <br>&gt; la" Spring<br>&gt; <br>&gt; Not necessarily, the reload check could be done before the OFF check...<br>&gt; <br>&gt; ----- Original Message ----<br>&gt; From: Tom Leccese &lt;tleccese@cybershift.com&gt;<br>&gt; To: logback users list &lt;logback-user@qos.ch&gt;<br>&gt; Sent: Thursday, September 27, 2007 12:57:36 PM<br>&gt; Subject: [logback-user] RE: [logback-user] logback initialization "à la" <br>&gt;
 Spring<br>&gt; <br>&gt; One snafu, perhaps.&nbsp;&nbsp;If all your loggers in your current config are <br>&gt; turned OFF, then a message would never get generated, and it would never <br>&gt; check to see if the config file has changed.<br>&gt; <br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; -----Original Message-----<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; *From:* logback-user-bounces@qos.ch<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; [mailto:logback-user-bounces@qos.ch]*On Behalf Of *Arthur Blake<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; *Sent:* Thursday, September 27, 2007 12:45 PM<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; *To:* logback users list<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; *Subject:* Re: [logback-user] logback initialization "à la" Spring<br>&gt; <br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; I've used automatic reloading in the past in log4j and it certainly<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; can be a very nice and convenient feature--<br>&gt; <br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; There are various issues that come
 up in the complexity of<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; implementing it -- normally it's done with a separate Thread that<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; runs and wakes up every so often to check if the file timestamp on<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; the config file has changed.<br>&gt; <br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Thats a bit of a clunky and complex way to do it.<br>&gt; <br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; I have been mentally toying with an idea for a new way to accomplish<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; this, without having to have a separate thread-- The check could be<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; done at the point where each log message is generated-- system wide.<br>&gt; <br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Since you already know the timestamp of the message generated, you<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; could just compare that to the timestamp of the last time the log<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; config file was reloaded-- and if a certain
 amount of time has<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; elapsed since the last time the file was checked, you kick off the<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; code that checks to see if the file time stamp has changed, and if<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; so, reload it (that part could be done asynchronously as well so as<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; not to slow down other threads writing out log messages)<br>&gt; <br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; It's simple, fast and it would have the very nice benefit of not<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; having to have a separate Thread-- furthermore, you avoid the<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; overhead of periodically checking the modification file stamp, over<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; long periods when there is no log activity (such as idle periods<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; when a server might not be getting any activity)<br>&gt; <br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Has anyone thought of implementing it this
 way?<br>&gt; <br>&gt; <br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; ----- Original Message ----<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; From: Jorg Heymans &lt;jorg.heymans@gmail.com&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; To: logback users list &lt;logback-user@qos.ch&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Sent: Thursday, September 27, 2007 10:23:07 AM<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Subject: Re: [logback-user] logback initialization "à la" Spring<br>&gt; <br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; On 9/27/07, *Davide Baroncelli* &lt;baroncelli@yahoo.com<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;mailto:baroncelli@yahoo.com&gt;&gt; wrote:<br>&gt; <br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; P.s.: let me express my disagreement for logback and sl4j not<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; supporting<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; neither the FATAL logging level nor automatic reloading of<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 config files.<br>&gt; <br>&gt; <br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; +1 for automatic reloading !<br>&gt; <br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Jorg<br>&gt; <br>&gt; <br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; ------------------------------------------------------------------------<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Catch up on fall's hot new shows<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;<a target="_blank" href="http://us.rd.yahoo.com/tv/mail/tagline/falltv/evt=47093/*http://tv.yahoo.com/collections/3658%20">http://us.rd.yahoo.com/tv/mail/tagline/falltv/evt=47093/*http://tv.yahoo.com/collections/3658%20</a>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; on Yahoo! TV. Watch previews, get listings, and more! <br>&gt; <br>&gt; <br>&gt; This e-mail and any attachments may contain confidential and privileged <br>&gt; information. If you are not the intended recipient, please notify the <br>&gt; sender immediately by return e-mail, delete this e-mail and destroy any <br>&gt; copies. Any
 dissemination or use of this information by a person other <br>&gt; than the intended recipient is unauthorized and may be illegal.<br>&gt; <br>&gt; <br>&gt; ------------------------------------------------------------------------<br>&gt; Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s user <br>&gt; panel <br>&gt; &lt;<a target="_blank" href="http://us.rd.yahoo.com/evt=48516/*http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7%20">http://us.rd.yahoo.com/evt=48516/*http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7%20</a>&gt; <br>&gt; and lay it on us.<br>&gt; <br>&gt; <br>&gt; ------------------------------------------------------------------------<br>&gt; Looking for a deal? Find great prices on flights and hotels <br>&gt; &lt;<a target="_blank"
 href="http://us.rd.yahoo.com/evt=47094/*http://farechase.yahoo.com/;_ylc=X3oDMTFicDJoNDllBF9TAzk3NDA3NTg5BHBvcwMxMwRzZWMDZ3JvdXBzBHNsawNlbWFpbC1uY20">http://us.rd.yahoo.com/evt=47094/*http://farechase.yahoo.com/;_ylc=X3oDMTFicDJoNDllBF9TAzk3NDA3NTg5BHBvcwMxMwRzZWMDZ3JvdXBzBHNsawNlbWFpbC1uY20</a>-&gt; <br>&gt; with Yahoo! FareChase.<br>&gt; <br>&gt; <br>&gt; ------------------------------------------------------------------------<br>&gt; <br>&gt; _______________________________________________<br>&gt; Logback-user mailing list<br>&gt; Logback-user@qos.ch<br>&gt; <a target="_blank" href="http://qos.ch/mailman/listinfo/logback-user">http://qos.ch/mailman/listinfo/logback-user</a><br><br>-- <br>Ceki Gülcü<br>Logback: The reliable, generic, fast and flexible logging framework for Java.<br><a target="_blank" href="http://logback.qos.ch">http://logback.qos.ch</a><br>_______________________________________________<br>Logback-user mailing
 list<br>Logback-user@qos.ch<br><a target="_blank" href="http://qos.ch/mailman/listinfo/logback-user">http://qos.ch/mailman/listinfo/logback-user</a><br></div></div><br></div></div><br>
      <hr size=1>Moody friends. Drama queens. Your life? Nope! - their life, your story.<br> <a href="http://us.rd.yahoo.com/evt=48224/*http://sims.yahoo.com/">Play Sims Stories at Yahoo! Games. </a></body></html>