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 sk k <sk...@yahoo.com> on 2002/10/22 15:42:17 UTC

Problems with log4j properties loading

Hi,

The log4j Configurator is not able to find my config
file for some reason. Don't know why?.

Here is the commandline 
java  -classpath
C:\log4j\log4j-1.2.6.jar;.;%CLASSPATH%
-Dlog4j.debug=true 
-Dlog4j.configuration=..\tmp\CustomLog4j.xml Test1

I have both tmp dir and CustomLog4j.xml file so don't
know why relative path is a problem but if I specify
full path to the xml prop
file(C:/tmp/CustomLog4j.xml), then it is works fine.

I also tried   
-Dlog4j.configuration=../tmp/CustomLog4j.xml, but it
doesn't work

Does log4j read relative path in canonical form. Pls
let me know.


Here is the output
------------------
1)
log4j: Trying to find [..\tmp\CustomLog4j.xml] using
context classloader sun.mis
c.Launcher$AppClassLoader@404536.
log4j: Trying to find [..\tmp\CustomLog4j.xml] using
sun.misc.Launcher$AppClassL
oader@404536 class loader.
log4j: Trying to find [..\tmp\CustomLog4j.xml] using
ClassLoader.getSystemResour
ce().
log4j: Could not find resource:
[..\tmp\CustomLog4j.xml].

2)
log4j: Trying to find [../tmp/CustomLog4j.xml] using
context classloader sun.mis
c.Launcher$AppClassLoader@404536.
log4j: Trying to find [../tmp/CustomLog4j.xml] using
sun.misc.Launcher$AppClassL
oader@404536 class loader.
log4j: Trying to find [../tmp/CustomLog4j.xml] using
ClassLoader.getSystemResour
ce().
log4j: Could not find resource:
[../tmp/CustomLog4j.xml].


__________________________________________________
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/

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