Re: Re: Using lt;levelgt; (was: Re: Re: Appender logging to 2 logs - how to stop it)

2003-11-11 Thread otisg
Thank you Jacob/Jake, this helped a lot. Otis Get your own 800 number Voicemail, fax, email, and a lot more http://www.ureach.com/reg/tag On Mon, 10 Nov 2003, Jacob Kjome ([EMAIL PROTECTED]) wrote: At 08:40 AM 11/10/2003 -0500, you

Re: automatic reload

2003-11-11 Thread Tom Eugelink
I see (took a look at the sources that were included in the older mail). Basically he has rewritten the AndWatch part, expanding it into a semi-framework, and adding a method to stop the thread (stopWatching). Basically one could write a servlet that starts a watchdog upon load and stops it

RE: automatic reload

2003-11-11 Thread Mark Womack
Tom, In v1.3 Watchdogs will be a subclass of Plugin. Plugins are new to v1.3 and configurable from (at least xml) configuration files. So, you'll be able to define watchdogs in the configuration files. Plugins have some code to not stop/recreate running plugins during reconfiguration, so

Re: automatic reload

2003-11-11 Thread Tom Eugelink
Hey Mark, Well, I could always try to make time (time suddenly is a rare commodity once you furthered yourself in the human genepool, at least for the next 6 years or so). What I see as a problem is not so much the automatic starting of a thread, but when to stop it. In a stand alone

RE: automatic reload

2003-11-11 Thread Shapira, Yoav
Howdy, A decent place to stop and start such threads in a servlet container would be the ServletContextListener. There is no static destructor, but you have Runtime#addShutdownHook which is suitable for this purpose as well. Create a little Runnable class with a reference to the Watchdog

RE: automatic reload

2003-11-11 Thread Ken . Liu
I don't think addShutdownHook() is enough for a J2EE deployment if you are relying on static initialization of the thread. Static initialization occurs upon application deployment, but the shutdown hook would only run when the server is stopped, not when the application is undeployed.

RE: automatic reload

2003-11-11 Thread Larry Young
Ken, I don't know, perhaps my solution is too simplistic or too low-tech, but for a webapp, I simply have a URL that I ping when I change the log4j config file. Since the config file doesn't change automatically, it's pretty trivial to hit the URL right after I change the file. I

RE: automatic reload

2003-11-11 Thread Ken . Liu
I don't know, perhaps my solution is too simplistic or too low-tech, but for a webapp, I simply have a URL that I ping when I change the log4j config file. Since the config file doesn't change automatically, This is the approach I use. I have a servlet that calls configure().

RE: automatic reload

2003-11-11 Thread Ken . Liu
BTW, reloading via a servlet in this way has some potential security implications, so tread carefully. Ken -Original Message- From: Liu, Ken (C) Sent: Tuesday, November 11, 2003 3:41 PM To: [EMAIL PROTECTED] Subject: RE: automatic reload I don't know, perhaps my

RE: automatic reload

2003-11-11 Thread Larry Young
Ken, Absolutely. One of the advantages of the login approach is that it avoids this problem, since only users who are able to login can trigger the reload. --- regards --- Larry At 01:45 PM 11/11/03, you wrote: BTW, reloading via a servlet in this way has some potential security

RE: automatic reload

2003-11-11 Thread Mark Womack
There is a configuration servlet in the current log4j-sandbox cvs that I have been hoping to upgrade to handle the reloading of a configuration file. I just mention it because we would like to release a set of useful, servlet/webapp related classes with the v1.3 release. -Mark -Original

RE: automatic reload

2003-11-11 Thread Charles Hudak
I created one of these for our application. It also handles clustered servers so if you have multiple servers using the same config, it will do a reload on all of them by hitting the main url (useful if you are behind a firewall or using a big ip box, like we are). You can also have specific

RE: automatic reload

2003-11-11 Thread Charles Hudak
Looks the attachment got filtered out. If anyone is interested, they can email me for the source. Sorry, but I don't have access to the cvs repository behind our firewall to upload it. -Original Message- From: Charles Hudak [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 11, 2003 15:57

Newbie question on setting different levels

2003-11-11 Thread Scott Smith
I've been reading through documentation on log4j and thought I understood how everything works. But there is something I'm missing. Since several of the Jakarta libraries seem to log to the root logger, I wanted to set up the root logger with the appenders. Then I would set the root logger to

RE: Newbie question on setting different levels

2003-11-11 Thread Mark.Priest
Scott, Is it possible that the Jakarta libraries are reconfiguring log4j on you after your configuration has run? I ran into this with the open source Joram JMS implemnetation. As soon as I started using the Joram classes, some static Joram code would reconfigure log4j and blow away my

RE: Newbie question on setting different levels

2003-11-11 Thread Paul Smith
On Wed, 2003-11-12 at 13:57, [EMAIL PROTECTED] wrote: Scott, Is it possible that the Jakarta libraries are reconfiguring log4j on you after your configuration has run? I ran into this with the open source Joram JMS implemnetation. As soon as I started using the Joram classes, some

Re: automatic reload

2003-11-11 Thread Tom Eugelink
Ah, my worries are confirmed :-) [EMAIL PROTECTED] wrote: I don't think addShutdownHook() is enough for a J2EE deployment if you are relying on static initialization of the thread. Static initialization occurs upon application deployment, but the shutdown hook would only run when the server is

Re: automatic reload

2003-11-11 Thread Tom Eugelink
I also use a servlet to reload, but since I've gotten grip on the automatic feature of log4j, I started liking it. But it seems servlets is the way to go at this time. However my servlet isn't such a fancy one like yours, so I would be interested in the source! Tom Charles Hudak wrote: