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 "John C. Turnbull" <oz...@ozemail.com.au> on 2002/11/11 19:49:22 UTC

Embedding config data in existing XML

We have an existing XML configuration file for our product and would like to
have log4j access its configuration parameters from there too instead of
from a separate file.

Is this possible?  What do I need to do?

-JT


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Embedding config data in existing XML

Posted by Ceki Gülcü <ce...@qos.ch>.
Try

new DOMConfigurator().doConfigure(Element element, LoggerRepository repository)

where element should be the log4j:configuration element from your config 
file and repository can be LogManager.getLoggerRepository().

HTH,

At 05:49 12.11.2002 +1100, John C. Turnbull wrote:
>We have an existing XML configuration file for our product and would like to
>have log4j access its configuration parameters from there too instead of
>from a separate file.
>
>Is this possible?  What do I need to do?
>
>-JT

--
Ceki

TCP implementations will follow a general principle of robustness: be
conservative in what you do, be liberal in what you accept from
others. -- Jon Postel, RFC 793



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>