This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Other Open Source Projects and the fly likes how to set the log file ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "how to set the log file ?" Watch "how to set the log file ?" New topic

how to set the log file ?

Rajeev Ravindran
Ranch Hand

Joined: Aug 27, 2002
Posts: 455

could someone tell me how to set the log file using commons logging ? i went through the site but i didnt not find anything good for me there . Am i missing anything ? I just want to write the log details to c:\mylog.log when i execute my java program.

JigaR Parekh
Ranch Hand

Joined: May 23, 2005
Posts: 112

Commons Loggin is just Logging Wrapper. This can be used to remove compile-time and run-time dependencies on any particular logging package.

For configuration you have to depend on perticular loggin api you are using like log4j,jdk logging or any other logging api.

Look at below link u will find out.

Configuration of Commons logging

[ October 25, 2005: Message edited by: JigaR Parekh ]
Ranch Hand

Joined: Oct 09, 2003
Posts: 517
create a file
log4j.rootCategory=INFO, dest
#specify the destination file
#specify the destination where you want to display your messages

hope this will help you!

God Gave Me Nothing I Wanted<br />He Gave Me Everything I Needed<br /> - Swami Vivekananda
Rajeev Ravindran
Ranch Hand

Joined: Aug 27, 2002
Posts: 455
Thanks Jigar / Minu..

I was having the feeling that common-logging is just another tool like log4j. I was in hurry and was checking the tutorial for setting up the property files.. my bad! Thanks again to point me to the right direction.

I agree. Here's the link:
subject: how to set the log file ?
Similar Threads
log4j wrapper
HowTo Disable Logging Output for classes using commons.logging
Log issue of Tomcat 6.0.26
J2SE Logging Framework
Problem in accessing struts-blank application