At 04:18 PM 4/27/2004, Endre St�lsvik wrote:
On Tue, 27 Apr 2004, Ceki G�lc� wrote:

|
| Endre,
|
| Here are a few hints that you might find useful.

Thanks ..

But will you -remove- DOMConfigurator?

Yes! DOMConfigurator will eventually be reduced to


/**
 * @deprecated Use JoranConfigurator instead.
 */
class DOMConfigurator extends JoranConfigurator {
}

to provide backward compatibility and then it will be simply removed.

 I mean, it is -just- a simple
setter, and a very natural one that is. If you're about to deprecate it,
why not just add it, and deprecate it in the same go - it is really "a
missing feature".

The code in DOMConfigurator will not survive in 1.3beta.


The point is that the DOMConfigurator already do perform -general-
variable substitution, but since the "props" reference in DOMConfigurator
is highly null (there are only -one- reference to it ever, that is when
it's passed to the substituter!), all substitutions are done using only
System.getProperty().

I know. I just did not want to waste time implementing it given the bleak future awaiting DOMConfigurator.


Btw: the javadocs there says that it first tries system props, then the
supplied props - this is not true reading the code.

Yes. That is the indented behavior.


The code is even cooler than I knew; there is recursive substitution!

The Joran stuff: shouldn't this also have this -amazing- feature that
property-substituion really is from start of? It is really magic - it
solved all my problems! I earlier had a script that reg-exped through the
log4j.xml file for some stupid delimiter, before starting tomcat. Now,
when I found this (undocumented?) feature, I only use the -D options to
the java-invoker!

The idea is to be able to use either -D options (system properties) or a property file as described in the javadocs.



Endre.

-- Ceki G�lc�

For log4j documentation consider "The complete log4j manual"
ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to