Here you go. It's pretty straightforward. Lemme know if you have any
questions.
-Original Message-
From: Tom Eugelink [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 11, 2003 21:50
To: Log4J Users List
Subject: Re: automatic reload
I also use a servlet to reload, but since I've
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
.
If you have any comments, ideas, or time to review (once I get it checked
in) I'd love to hear them.
thanks,
-Mark
-Original Message-
From: Tom Eugelink [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 11, 2003 6:06 AM
To: Log4J Users List
Subject: Re: automatic reload
I see (took
]
Sent: Tuesday, November 11, 2003 6:06 AM
To: Log4J Users List
Subject: Re: automatic reload
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
:[EMAIL PROTECTED]
Sent: Tuesday, November 11, 2003 1:45 PM
To: Log4J Users List
Subject: Re: automatic reload
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
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 11, 2003 1:50 PM
To: Log4J Users List
Subject: RE: automatic reload
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
Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 11, 2003 1:50 PM
To: Log4J Users List
Subject: RE: automatic reload
Howdy,
A decent place to stop and start such threads in a servlet container
would be the ServletContextListener.
There is no static
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().
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
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 solution is too simplistic or too
low-tech, but for a webapp, I simply have a URL
Message-
From: Larry Young [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 11, 2003 12:08 PM
To: Log4J Users List
Subject: RE: automatic reload
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
:46
To: 'Log4J Users List'
Subject: RE: automatic reload
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
To: 'Log4J Users List'
Subject: RE: automatic reload
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
?
Ken
-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 11, 2003 1:50 PM
To: Log4J Users List
Subject: RE: automatic reload
Howdy,
A decent place to stop and start such threads in a servlet container
would be the ServletContextListener
To: 'Log4J Users List'
Subject: RE: automatic reload
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
I know there is a parameter which can be used to specifiy that log4j
must reload a configuration file (checking every so often). But I prefer
autoconfiguration. AFAIK it is not possible to set autoreload from a
configuration file, correct?
Tom
look at configureAndWatch() in the configurators.
However, I wouldn't use this in a container as the thread will run until
the JVM is shut down. There is no manual way to stop it.
Look for Mark Womack's watchdogs in the next version of Log4j for a better
solution. Here's an old message with
17 matches
Mail list logo