This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Web Application And Logging

 
Luke Shannon
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All;

I have a web application that follows a MVC design pattern. JSP creates the view, servlets pass paramters back and forth between java classes that do all the business logic and database transactions.

Now I would like to get all the components writing to the same log file on the server. Not totally sure how I can do this.

My web server is Apache, Servlet Container is Tomcat, DB is mySQL.

Anyone out there done something like this? Any tips?

Thanks,

Luke
 
James Ellis
Ranch Hand
Posts: 205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can get all the components from Tomcat to log to the same log file by using Log4j. You can download it from here.
 
Luke Shannon
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Perfect! Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic