This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Other Open Source Projects and the fly likes slf4j logging issue - log file not getting generated Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "slf4j logging issue - log file not getting generated" Watch "slf4j logging issue - log file not getting generated" New topic
Author

slf4j logging issue - log file not getting generated

Mahesh Chandran
Greenhorn

Joined: Mar 23, 2011
Posts: 20
I am using slf4j over java util logging. I am trying to place logging.properties file so that it will picked up by my webapp. The following is how my logging.properties file look like:



I am NOT doing -Djava.util.logging.config.file="file_path/logging.properties. Instead I have put the logging.properties in my WEB-INF/classes and included this folder as a class folder in eclipse. I dont know if this is sufficient for things to work.

The log file myApp.log is not getting generated nor any logging happens in it. But anyways, the logging still occurs on the Eclipse console.

I suspect it is not taking this logging.properties file at all. But then I tried a suggestion from the posting - Java Logging - where is my log file? - I can see that it prints the file path with file name.

I will appreciate if some help can be provided in this regard.

NOTE: I am using slf4j over java util logging. Also I am sorry if you think I didn't do enough google search :-)

Regards Mahesh
Mahesh Chandran
Greenhorn

Joined: Mar 23, 2011
Posts: 20
Fixed the problem. Had to set -Djava.util.logging.config.file= "pathto\WEB-INF\classes\logging.properties in Arguments tab - Open Server->Open Launch Configuration in Eclipse
 
Consider Paul's rocket mass heater.
 
subject: slf4j logging issue - log file not getting generated