Two Laptop Bag
The moose likes Java in General and the fly likes Log4j not writing to FileAppender Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Log4j not writing to FileAppender" Watch "Log4j not writing to FileAppender" New topic
Author

Log4j not writing to FileAppender

kwame Iwegbue
Ranch Hand

Joined: Sep 02, 2000
Posts: 197
I'm just learning to use Log4j and I've searched the Log4j site and mailing lists before posting this question here.

I have this properties file:



It is writing to ConsoleAppender quite alright, but not to the RollingFileAppender. I've tried placing the file 'log_output.log' in src, in /main-folder, and even WEB-INF/classes.

Can someone help?


Who dares, wins! (SAS motto)
Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2300
why do not you try with the full path of the file 'log_output.log' .
like c:\test\log_output.log in the log4j.properties.


Rahul Bhattacharjee
LinkedIn - Blog
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Log4j not writing to FileAppender
 
Similar Threads
Help Please -log4j:WARN No appenders could be found for logger
log4j writing to multiple log
Log4j to debug Struts
problem read log4j configurations from tomcat
log4j problem writing to a log file.