File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 REST with Spring (video course) this week in the Spring 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.

It is sorta covered in the JavaRanch Style Guide.
subject: how to set the log file ?
It's not a secret anymore!