Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

logging into my own txt file

 
lee anthony
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi to everybody
i have below example to explain my question, i could not find my answer
about how can i log my information into my own txt file kept
in say /home/lee/tomcat5/leelog.txt
2)what is org.apache.struts.webapp.Example to do in the below snippet

thank lee
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
public final class EditSubscriptionAction extends Action {
private Log log =
LogFactory.getLog("org.apache.struts.webapp.Example");
public ActionForward execute(ActionMapping mapping, ..)
throw Exception{
....
if (log.isDebugEnabled()) {
log.debug("EditSubscriptionAction: Processing " + action + " action");
}
....
if (user == null) {
if (log.isTraceEnabled()) {
log.trace(" User is not logged on in session " + session.getId());
}
return (mapping.findForward("logon"));
}
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic