You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Eliot Sykes <el...@yahoo.co.uk> on 2004/03/25 16:25:41 UTC

log4j and tomcat 3.2 - reloadable context

Hi all,

I'm using log4j 1.2.8 in a webapp deployed under Tomcat 3.2.

In the development environment, reloadable=true for the webapp's
context, so I can compile java changes into the webapp without stopping
and starting tomcat.

After starting the webapp up, all the logging is directed to the
various log files as specified in log4j.properties which is great.

When I recompile while the webapp is running, afterwards the app's
log4j loggers write to tomcat.log with a priority level of WARN and
above (I believe this to be the default log4j settings).  The settings
made in log4j.properties when the app was originally started are
effectively forgotten.

Is there a way to ensure the logging continues with the settings in
log4j.properties after a recompile? Without restarting tomcat?

To confirm, unfortunately I have had no luck in looking for a solution
to this in the mail archive.

Thanks in advance for any help,
Eliot


	
	
		
___________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping" 
your friends today! Download Messenger Now 
http://uk.messenger.yahoo.com/download/index.html

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: log4j and tomcat 3.2 - reloadable context

Posted by Eliot Sykes <el...@yahoo.co.uk>.
I WISH we could upgrade to tomcat 5, but that's something penned for
the future.  Good news is I have got a solution to the problem.

By using log4j's default initialisation procedure of putting
log4j.properties in the classpath, everything is working as needed now.
 

Upon recompile, the log4j settings are reloaded and logging behaves as
expected.  No longer any need to restart tomcat.

Originally, the webapp's log4j.properties file was in WEB-INF/conf and
a servlet's init method was used to configure logging.

Eliot

 --- Jacob Kjome <ho...@visi.com> wrote: > Is there a particular reason
you are still using 3.2?  If you upgrade
> to 
> 5.x.xx, I can give you more advice.  3.2 was a *very* different
> product and 
> few people use it anymore.  I'm not surprised you've had little luck
> in 
> finding help with a product 4 years out of date.  You might find more
> help 
> with this on the Tomcat list.
> 
> Jake
> 
> At 03:25 PM 3/25/2004 +0000, you wrote:
> >Hi all,
> >
> >I'm using log4j 1.2.8 in a webapp deployed under Tomcat 3.2.
> >
> >In the development environment, reloadable=true for the webapp's
> >context, so I can compile java changes into the webapp without
> stopping
> >and starting tomcat.
> >
> >After starting the webapp up, all the logging is directed to the
> >various log files as specified in log4j.properties which is great.
> >
> >When I recompile while the webapp is running, afterwards the app's
> >log4j loggers write to tomcat.log with a priority level of WARN and
> >above (I believe this to be the default log4j settings).  The
> settings
> >made in log4j.properties when the app was originally started are
> >effectively forgotten.
> >
> >Is there a way to ensure the logging continues with the settings in
> >log4j.properties after a recompile? Without restarting tomcat?
> >
> >To confirm, unfortunately I have had no luck in looking for a
> solution
> >to this in the mail archive.
> >
> >Thanks in advance for any help,
> >Eliot
>  


	
	
		
___________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping" 
your friends today! Download Messenger Now 
http://uk.messenger.yahoo.com/download/index.html

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: log4j and tomcat 3.2 - reloadable context

Posted by Jacob Kjome <ho...@visi.com>.
Is there a particular reason you are still using 3.2?  If you upgrade to 
5.x.xx, I can give you more advice.  3.2 was a *very* different product and 
few people use it anymore.  I'm not surprised you've had little luck in 
finding help with a product 4 years out of date.  You might find more help 
with this on the Tomcat list.

Jake

At 03:25 PM 3/25/2004 +0000, you wrote:
>Hi all,
>
>I'm using log4j 1.2.8 in a webapp deployed under Tomcat 3.2.
>
>In the development environment, reloadable=true for the webapp's
>context, so I can compile java changes into the webapp without stopping
>and starting tomcat.
>
>After starting the webapp up, all the logging is directed to the
>various log files as specified in log4j.properties which is great.
>
>When I recompile while the webapp is running, afterwards the app's
>log4j loggers write to tomcat.log with a priority level of WARN and
>above (I believe this to be the default log4j settings).  The settings
>made in log4j.properties when the app was originally started are
>effectively forgotten.
>
>Is there a way to ensure the logging continues with the settings in
>log4j.properties after a recompile? Without restarting tomcat?
>
>To confirm, unfortunately I have had no luck in looking for a solution
>to this in the mail archive.
>
>Thanks in advance for any help,
>Eliot
>
>
>
>
>
>___________________________________________________________
>Yahoo! Messenger - Communicate instantly..."Ping"
>your friends today! Download Messenger Now
>http://uk.messenger.yahoo.com/download/index.html
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>For additional commands, e-mail: log4j-user-help@logging.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org