| Author |
how to set the log file ?
|
Rajeev Ravindran
Ranch Hand
Joined: Aug 27, 2002
Posts: 455
|
|
hi, could someone tell me how to set the log file using commons logging ? i went through the site http://jakarta.apache.org/commons/logging/index.html 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. Thanks, Rajeev
|
 |
JigaR Parekh
Ranch Hand
Joined: May 23, 2005
Posts: 112
|
|
Rajeev, 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 Jigar [ October 25, 2005: Message edited by: JigaR Parekh ]
|
 |
MInu
Ranch Hand
Joined: Oct 09, 2003
Posts: 517
|
|
create a log4j.properties file ****************************** log4j.rootCategory=INFO, dest #specify the destination file log4j.appender.dest=org.apache.log4j.RollingFileAppender #specify the destination where you want to display your messages log4j.appender.dest.File=C:/mylogfile 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. Rajeev.
|
 |
 |
|
|
subject: how to set the log file ?
|
|
|