logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ceki Gülcü <c...@qos.ch>
Subject Re: Antw: setting watch period in settings or config
Date Wed, 26 Jun 2002 09:40:06 GMT
Frank-Olaf,

Mark Womack has taken the lead on this. I am sure he would be interested to 
see what you have done. Thanks for the offer by the way.

At 09:27 26.06.2002 +0000, Frank-Olaf Lohmann wrote:
>I have written a wrapper class that implements Configurator that wraps 
>ConfigureAndWatch.
>Than used the DefaultInit method described in 
>http://jakarta.apache.org/log4j/docs/manual.html#defaultInit
>I have also introduced a property so I am able to set the watch time at 
>start time. Not that convenient as with the xml but sufficient for me.
>
>If you like code please let me know.
>
>Ceki: Is that interesting as a contribution to log4j?
>
>Regards
>Frank-Olaf Lohmann
>
>
>
> >>> tim.dawson@notiva.com 25.06.2002  18.04 Uhr >>>
>You can set the config file from a system property. You can set the
>internal log4j debug from a system property or from within the config
>file.  But if you want to configure and watch, you have to do that from
>within the code.
>
>The problem with this is in J2EE environments, you may have one external
>log4j.xml file for the server, and multiple .ear files. If you have to
>write code to start it up, you end up using something like a startup
>servlet, having to deal with what happens when the .ear file is
>reloaded, etc. It's a lot simpler (and more desirable) to simply handle
>this with the external configuration file.
>
>For example, you could put it in the log4j.xml file along side the debug
>attribute of the log4j:configuration element, i.e.
>
><log4j:configuration debug="true"
>                      watchDelay="60"
>                      xmlns:log4j="http://jakarta.apache.org/log4j/">
>  ...
></log4j:configuration>
>
>Or you could put it in the system parameters, e.g.
>  java -Dlog4j.watchDelay=60
>
>Perhaps this has been discussed previously and there are reasons for not
>doing it... but it seems like something that would be universally
>desirable. Am I missing something?
>
>---
>Tim Dawson                 office: 952.941.8278x13
>Lead Technical Architect   mobile: 612.384.5729
>Notiva Corporation         fax:    952.941.4596
>
>Notiva - optimizing trade relationships
>
>--
>To unsubscribe, e-mail:   <mailto:log4j-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org>
>
>
>
>--
>To unsubscribe, e-mail:   <mailto:log4j-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org>

--
Ceki


--
To unsubscribe, e-mail:   <mailto:log4j-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org>


Mime
View raw message