[logback-user] =?iso-8859-1?Q?RE:_=5Blogback-user=5D_logback_initialization_=22=E0_ la=22?= Spring

Tom Leccese tleccese at cybershift.com
Thu Sep 27 18:57:36 CEST 2007

One snafu, perhaps.  If all your loggers in your current config are turned
OFF, then a message would never get generated, and it would never check to
see if the config file has changed.
  -----Original Message-----
  From: logback-user-bounces at qos.ch [mailto:logback-user-bounces at qos.ch]On
Behalf Of Arthur Blake
  Sent: Thursday, September 27, 2007 12:45 PM
  To: logback users list
  Subject: Re: [logback-user] logback initialization "à la" Spring

  I've used automatic reloading in the past in log4j and it certainly can be
a very nice and convenient feature--

  There are various issues that come up in the complexity of implementing
it -- normally it's done with a separate Thread that runs and wakes up every
so often to check if the file timestamp on the config file has changed.

  Thats a bit of a clunky and complex way to do it.

  I have been mentally toying with an idea for a new way to accomplish this,
without having to have a separate thread-- The check could be done at the
point where each log message is generated-- system wide.

  Since you already know the timestamp of the message generated, you could
just compare that to the timestamp of the last time the log config file was
reloaded-- and if a certain amount of time has elapsed since the last time
the file was checked, you kick off the code that checks to see if the file
time stamp has changed, and if so, reload it (that part could be done
asynchronously as well so as not to slow down other threads writing out log

  It's simple, fast and it would have the very nice benefit of not having to
have a separate Thread-- furthermore, you avoid the overhead of periodically
checking the modification file stamp, over long periods when there is no log
activity (such as idle periods when a server might not be getting any

  Has anyone thought of implementing it this way?

  ----- Original Message ----
  From: Jorg Heymans <jorg.heymans at gmail.com>
  To: logback users list <logback-user at qos.ch>
  Sent: Thursday, September 27, 2007 10:23:07 AM
  Subject: Re: [logback-user] logback initialization "à la" Spring

  On 9/27/07, Davide Baroncelli <baroncelli at yahoo.com> wrote:

    P.s.: let me express my disagreement for logback and sl4j not supporting
    neither the FATAL logging level nor automatic reloading of config files.

  +1 for automatic reloading !


  Catch up on fall's hot new shows on Yahoo! TV. Watch previews, get
listings, and more!

This e-mail and any attachments may contain confidential and privileged information. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this e-mail and destroy any copies. Any dissemination or use of this information by a person other than the intended recipient is unauthorized and may be illegal.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://qos.ch/pipermail/logback-user/attachments/20070927/6319c07a/attachment.htm 

More information about the Logback-user mailing list