Classloader.getResource is used to try and load the file..

Here's the source file attempting to load the properties file (although
this is the CVS HEAD version, not the version in log4j 1.2.8):

http://cvs.apache.org/viewcvs.cgi/jakarta-log4j/src/java/org/apache/log4
j/helpers/Loader.java?rev=1.21&view=auto

Maybe this wil help you resolve the problem.

Scott

-----Original Message-----
From: Robert Upshall [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 23, 2004 2:33 PM
To: Log4J Users List
Subject: RE: log4j.properties on iSeries/AS400


/home/ru is in the classpath, it didn't work, neither did using the
log4.configuration property.  Both approaches should work but neither
does.


On Fri, 2004-07-23 at 16:23, Scott Deboy wrote:
> log4j needs to find your configuration file in the classpath.
> 
> Try this instead (log4j it will look for a file named 
> 'log4j.properties' on the classpath automatically)
> 
> java -classpath $CLASSPATH:/home/ru -Dlog4j.debug=true MyClass
> 
> 
> -----Original Message-----
> From: Robert Upshall [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 23, 2004 2:18 PM
> To: [EMAIL PROTECTED]
> Subject: log4j.properties on iSeries/AS400
> 
> 
> I cannot get the log4j to find the properties file.  I have put in the

> classpath and also set the log4j.configuration property and still 
> nothing.
> 
> Here is the command line:
> 
>  > java -Dlog4j.debug=true 
> -Dlog4j.configuration=/home/ru/log4j.properties MyClass
> 
> 
> Here is the output:
> 
> log4j: Trying to find [/home/ru/log4j.properties] using context 
> classloader s
>    [EMAIL PROTECTED]
>    log4j: Trying to find [/home/ru/log4j.properties] using 
> sun.misc.Launcher$App
>    [EMAIL PROTECTED] class loader.
>    log4j: Trying to find [/home/ru/log4j.properties] using 
> ClassLoader.getSystem
>    Resource().
>    log4j: Could not find resource: [/home/ru/log4j.properties].
>    log4j:WARN No appenders could be found for logger
> (com.psasoft.sprint.Switch)
>    .
>    log4j:WARN Please initialize the log4j system
> properly.                                                       
> 
> 
> 
> Can somebody please help, I need to get this code ported.
> 
> Robert
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to