logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Curt Arnold <carn...@apache.org>
Subject Re: NOOB needs Help with accessing log4j.properties. Already tried -Dlog4j.configuration=./log4j.properties and modifying the classpath
Date Thu, 09 Oct 2008 20:54:42 GMT
The logic that interprets the log4j.configuration system property is  
in org.apache.log4j.LogManager, where configurationOptionStr is the  
value of "log4j.configuration" system property.

	try {
	  url = new URL(configurationOptionStr);
	} catch (MalformedURLException ex) {
	  // so, resource is not a URL:
	  // attempt to get the resource from the class path
	  url = Loader.getResource(configurationOptionStr);

-Dlog4j.configuration=./log4j.properties will not be properly resolved  
since the URL is not interpreted relative to a base URL.  If you  
specify -Dlog4j.configuration, it must be an absolute URL, like file:///home/myname/log4j.properties

  or the path to a resource on the class path.

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

View raw message