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 Joe Collins <jo...@letsys.com> on 2004/01/23 18:44:53 UTC

location / specification of location for log4j

I get the following error when I run my code containing log4j logging
(in java struts)
 
log4j:ERROR Could not open [].
java.io.FileNotFoundException:  (The system cannot find the path
specified)
 
I have my log4j.xml file in the WEB-INF\classes directory of my server
I point to log4j-1.2.6.jar on the classpath of my server on start up
I specify Set
JAVA_OPTIONS=-Dlog4j.config=C:\bea\user_projects\domains\....\WEB-INF\cl
asses\log4j.xml
 
Is the above error detailing that it cannot find the log4j.xml
If so, is this because I have specified the location of incorrectly i.e.
should I specify where it is some where other than the startup.cmd of my
server
Or is it because I have the log4j.xml in the wrong directory.
 
Apologies for yet another basic query but I could not find any
clarification on the location / specification of the location for
log4j.xml.
 
In humble hope yours,
 
Joe
 
 
 

Re: location / specification of location for log4j

Posted by Jacob Kjome <ho...@visi.com>.
First, I would upgrade to 1.2.8.  Second, I would not point to a config 
file within a single webapp to be used for the whole VM.  If this logging 
is to be for WebLogic as a whole, put the file somewhere not application 
specific.  If you want application specific logging, don't set this 
property at all and just put Log4j-1.2.8.jar in WEB-INF/lib and your 
log4j.xml in WEB-INF/classes and use Log4j's autoconfiguration (BTW, only 
version 1.2.8 will automatically pick up a log4j.xml file from the 
classpath.  Previous versions only looked for log4j.properties).

You can also read this....
http://nagoya.apache.org/wiki/apachewiki.cgi?Log4JProjectPages/AppContainerLogging

Jake

At 05:44 PM 1/23/2004 +0000, you wrote:
>I get the following error when I run my code containing log4j logging
>(in java struts)
>
>log4j:ERROR Could not open [].
>java.io.FileNotFoundException:  (The system cannot find the path
>specified)
>
>I have my log4j.xml file in the WEB-INF\classes directory of my server
>I point to log4j-1.2.6.jar on the classpath of my server on start up
>I specify Set
>JAVA_OPTIONS=-Dlog4j.config=C:\bea\user_projects\domains\....\WEB-INF\cl
>asses\log4j.xml
>
>Is the above error detailing that it cannot find the log4j.xml
>If so, is this because I have specified the location of incorrectly i.e.
>should I specify where it is some where other than the startup.cmd of my
>server
>Or is it because I have the log4j.xml in the wrong directory.
>
>Apologies for yet another basic query but I could not find any
>clarification on the location / specification of the location for
>log4j.xml.
>
>In humble hope yours,
>
>Joe
>
>
>


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