logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Carnahan <carna...@protos.lifesci.ucla.edu>
Subject Re: Difference in using BasicConfigurator v.s. DOMCOnfigurator
Date Thu, 01 Mar 2001 15:52:12 GMT
Jim,

Why is this so? Assuming the file is local, Class.getResource will 
return a URL with prefix 'file' that should work regardless of whether 
the file is a properties file or xml. As long as either is somewhere in 
the classpath this works great. The only question that would remain is 
precedence if both are found.

John

> You have to provide what file to use as a system property. For example:
> 
> java -Dlog4j.configuration=file:log4j.xml MyProgram
> 
> -Jim Moore
> 
> 
> -----Original Message-----
> From: Rouwendaal, Fernand [mailto:Fernand_Rouwendaal@nl.compuware.com]
> Sent: Thursday, March 01, 2001 3:17 AM
> To: 'log4j-user@jakarta.apache.org'
> Subject: Difference in using BasicConfigurator v.s. DOMCOnfigurator
> 
> 
> Hi,
> 
> When using the BasicConfigurator, you can make use of a very handy feature:
> The configuration file log4j.properties is searched for in the classpath.
> Benefit: In your code, you never have to specify the location hardcoded.
> 
> When using the DOMConfigurator, I cannot make this mechanism to work. Am I
> doing something wrong, or is this feature unsupported for DOMConfigurators ?
> 
> 	- Fernand.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: log4j-user-help@jakarta.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: log4j-user-help@jakarta.apache.org
> 


Mime
View raw message