Does the "WEB-INF/ogs" directory actually exist? Log4j will not create the directory for you if it doesn't already exist. You'll need to make sure that the directory where the log file is to be placed already exists (create it yourself by hand or programatically) before Log4j attempts to write the file. If it does exist, it could be a permissions problem.


Jake

At 07:52 PM 3/26/2005 +0000, you wrote:
>Hello all,
>
>I am trying to configure LOG4J on my linux machine. I was successful on my
>Windows XP machine.
>My log4j.properties specifies the following for DailyRollingFileAppender
>
># dailyfile is a DailyRollingFileAppender
>#
>log4j.appender.dailyfile=org.apache.log4j.DailyRollingFileAppender
>log4j.appender.dailyfile.threshold=INFO
>log4j.appender.dailyfile.file=/home/meuser/eclipse-projects/Testproject
>/WEB-INF/logs/logfile.log
>log4j.appender.dailyfile.datePattern='.'yyyy-MM-dd
>log4j.appender.dailyfile.append=true
>log4j.appender.dailyfile.layout=org.apache.log4j.PatternLayout
>log4j.appender.dailyfile.layout.ConversionPattern=%-5p %d{ISO8601} [%t] - %m%n
>
>
>But my code cannot seem to find the path to logfile.log.
>This is the error that I get on my tomcat console -
>
>Please help !
>
>Thanks in advance
>
>==========
>log4j:ERROR setFile(null,true) call failed.
>java.io.FileNotFoundException:
>/home/meuser/eclipse-projects/Testproject/WEB-INF/logs/logfile.log
>(No such file
>or directory)
> at java.io.FileOutputStream.openAppend(Native Method)
> at java.io.FileOutputStream.<init>(FileOutputStream.java:177)
> at java.io.FileOutputStream.<init>(FileOutputStream.java:102)
> at org.apache.log4j.FileAppender.setFile(FileAppender.java:273)
> at org.apache.log4j.FileAppender.activateOptions
>(FileAppender.java:152)
> at
>
>
>
>---------------------------------------------------------------------
>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