Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

about log() of GenericServlet

 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI All,

log() method is used for(i read it)
----------------------------------
log(java.lang.String msg)
Writes the specified message to a servlet log file, prepended by the servlet's name.
----------------------------------

but i want to know how to use this and where can i see these log,if i put something into this from some servlet..


please anyone can explain me ?
 
Steve Luke
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use it by calling log("Message to Log") in any of your servlets that extend Generic Servlet.

Where are the logs? How do you configure them? That is server dependent. For Tomcat it is usually <Tomcat_Home>/logs, but other applications will store them elsewhere, and this can usually be configured (again in a server-dependent and for Tomcat version dependent manner). So the best thing to do is read your Server's manual about how it handles logging.
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
THANKS steve
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic