Hello, I have just started using log4j's xml-based configuration and though it supports substitution for system properties, I have not found anything about defining generic variables that can be referenced in the configuration file.
When using PropertyConfigurator I found this very convenient and Ant has this feature in its xml build file. Has anyone experience this and found a workaround for it? Is there any reason this was not added or is it planned for future releases? Thank you in advance for your time. Fabien --------------------------------------------- Fabien Modoux, Voicemate - http://www.voicemate.com > -----Original Message----- > From: Thomas Muller [mailto:[EMAIL PROTECTED]] > Sent: Thursday, November 21, 2002 5:39 AM > To: Log4J Users List > Subject: RE: Initialization Question > > > Log4j has supported system properties interpolation in XML/properties > configuration files at least since I started using it (almost > two years > ago). > > Just add the variables to system properties before Log4j > fires up, e.g. with > the -D option to the VM. > > -- > > Thomas > > | -----Original Message----- > | From: Michael Rimov [mailto:[EMAIL PROTECTED]] > | Sent: 21 November 2002 09:52 > | To: [EMAIL PROTECTED] > | Subject: Initialization Question > | > | > | Hey all, > | > | A quick question. > | > | We've been using Log4j for the Expresso project since > before it moved to > | Jakarta, and it has been extremely faithful. I've been > working on how to > | better set up xml configuration with log4j since DOM > configuration has > | obviously matured greatly since we first dealt with it. :) > | > | The only reason left for using a custom configurator AFAICT > is because we > | expand various properties in the DOM configuration. For example, > | we define > | a LOG_DIR property that my configuration loader expands > with our desired > | values. > | > | However, I would LOVE to see our own custom configurator > done away with > | alltogether. I realized that when installing JBoss on my > system, that I > | never had to modify the log4j.xml file so that it starting > logging in the > | right location, so I took a look at this and found: > | > | <appender name="FILE" > | class="org.jboss.logging.appender.DailyRollingFileAppender"> > | <param name="File" value="${jboss.server.home.dir}/log/server.log"/> > | ^^^^^^^^^^^^^^^^^^^^^^^ > | > | ..... > | > | Does log4j now support 'ANT-like' properties expansions > like that listed > | above where I can set Java properties and have it expanded > properly in > | DOMConfigurator or is JBoss' custom > DailyRollingFileAppender doing this?? > | > | If log4j DOESN'T do it already, may I ask for it to be put > on the feature > | request list? ;) > | > | Thanks for your time in advance! > | -Mike > | > | > | > | -- > | To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > > > > > ************************************************************** > *********** > Copyright ERA Technology Ltd. 2002. (www.era.co.uk). All > rights reserved. > The information supplied in this Commercial Communication > should be treated > in confidence. > No liability whatsoever is accepted for any loss or damage > suffered as a result of accessing this message or any attachments. > > ______________________________________________________________ > __________ > This email has been scanned for all viruses by the MessageLabs SkyScan > service. For more information on a proactive anti-virus > service working > around the clock, around the globe, visit http://www.messagelabs.com > ______________________________________________________________ > __________ > > -- > To unsubscribe, e-mail: > <mailto:log4j-user-> [EMAIL PROTECTED]> > For > additional commands, > e-mail: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>