Hi
I was thinking about a servlet approach, a
initialization servlet which will load a properties
file from its init method, and setup the initial debug
level suppose ERROR, this servlet also has a get
method which will read the input from a html page
which can be DEBUG and then setup the log4j
At 06:42 PM 1/21/2005 -0500, you wrote:
Also keep in mind that Log4J has a JMX API that lets you configure it on the
fly from the web, remotely, ...
http://logging.apache.org/log4j/docs/api/org/apache/log4j/jmx/package-summary.html
Except that the JMX stuff has been removed from Log4j-1.3 because
There's two approaches.
Configure tomcat to reload the context when class changes are made
(log4j.properties being in the classes directory, will count as a class
being changed, and then the whole context will reload). We do this all the
time.
Log4j can be used in a manner where config
Hi, Andy,
I never thought of Mike's first suggestion there before. I like it. I
have some more suggestions (although I think my 2nd is just the details
of Mike's 2nd):
Suggestion #1
Put this in a JSP, and hit the JSP whenever you change your log
properties:
Subject: Re: reload log4j.properties on-the-fly?
In the first case, since log4j.properties is in the global
Tomcat classes dir - would that reload every Context?
On Fri, 21 Jan 2005 12:19:48 -0600, Mike Curwen
[EMAIL PROTECTED] wrote:
There's two approaches.
Configure tomcat
Use the configureAndWatch method of a configurator in an initialization servlet.
-Original Message-
From: Andy Kriger [mailto:[EMAIL PROTECTED]
Sent: Friday, January 21, 2005 2:06 PM
To: tomcat-user@jakarta.apache.org
Subject: Re: reload log4j.properties on-the-fly?
Right - I have
of a configurator in an initialization
servlet.
-Original Message-
From: Andy Kriger [mailto:[EMAIL PROTECTED]
Sent: Friday, January 21, 2005 2:06 PM
To: tomcat-user@jakarta.apache.org
Subject: Re: reload log4j.properties on-the-fly?
Right - I have logging in WEB-INF/classes that I can
-Systems: Mainframe Group
University of Texas - Austin
tele: (512) 232-6562
email: [EMAIL PROTECTED]
-Original Message-
From: Andy Kriger [mailto:[EMAIL PROTECTED]
Sent: Friday, January 21, 2005 1:33 PM
To: tomcat-user@jakarta.apache.org
Subject: Re: reload log4j.properties on-the-fly
: Friday, January 21, 2005 1:33 PM
To: tomcat-user@jakarta.apache.org
Subject: Re: reload log4j.properties on-the-fly?
To clarify - an initialization servlet defined in
conf/web.xml will be able to reload the log4j config used by
the Tomcat server (remember we're not talking about webapps
Andy,
Try the following to enable the log4j watchdog:
public static void configure(final String configFile, final long
delay, final Logger logger) {
PropertyConfigurator.configureAndWatch(configFile,delay);
FileWatchdog watcher = new FileWatchdog(configFile) {
public
on the file system location which is error prone.
- Original Message -
From: Mike Curwen [EMAIL PROTECTED]
To: 'Tomcat Users List' tomcat-user@jakarta.apache.org
Sent: Friday, January 21, 2005 3:50 PM
Subject: RE: reload log4j.properties on-the-fly?
Right, so you want to configure *tomcat
11 matches
Mail list logo