• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

servlet context log info

 
krishnama raju
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

hai, i am new to servlets. so i have doubt where these log information is stored.


Context = getServletContext();
context.log("Init has been invoked");?
 
Ankit Garg
Sheriff
Posts: 9528
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you read the documentation of ServletContext.log method, it says
Writes the specified message to a servlet log file, usually an event log. The name and type of the servlet log file is specific to the servlet container.

So which servlet container are you using?? Is tomcat or something else??
 
krishnama raju
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your reply.

i am using tomcat . And i want to know about where this log info stored.
 
sakthi vadivel
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
by default log files will be stored inside TOMCAT installed directory. for ex TOMCAT/classes/log
 
Vijay Kumar
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Krishna,

By default logs are generated at <TOMCAT_HOME>/logs/localhost.YYYY-MM-DD

see below sample of generated logs-

Jan 19, 2010 8:11:10 PM org.apache.catalina.core.ApplicationContext log
INFO: I have been invoked

Regards,
Vijay
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic