logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Endre Stølsvik <En...@Stolsvik.com>
Subject Re: DOMConfigurator.props
Date Tue, 27 Apr 2004 14:56:22 GMT
On Tue, 27 Apr 2004, Ceki Gülcü wrote:

| 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.

Well, good.

| >  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.

But the idea, then? A setProperties(Properties props) method?

| >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.

Huh? "Waste time": it's a -three line- addition! I can give you a patch!!

| >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.

Eh.. I pointed out an inconsistency there: the docs says something, then
the code does something else: -what- is the intended (I assume you meant?)

| >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.

Where is this described, you say?


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

View raw message