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

Tomcat 5 - access logs?

 
James Hodgkiss
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

Does anyone know how to configure Tomcat 5 so it creates access logs (like how my old Tomcat 4 did...).

Cheers,
James
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64631
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Would this not be more appropriate for the Tomact forum?

I do it pretty much the same in Tomcat 5 as I did on 4. The following is placed in every <Host> element:


This creates access log files in the $CATALINE_HOME/logs folder; one for each host (substitue 'whatever' with whatever makes sense).

Is this not what you are looking for?
[ August 10, 2004: Message edited by: Bear Bibeault ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64631
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
James asked in a PM what file this declaration should be made within. I am answering here so that anyone else with the same question can see it.

This declaration should be placed within the server.xml file within the <Host> element for which you want to enable access logging.

Here, for example, is an entry from my server.xml (with the names changed to protect the innocent). Assume the host is www.whatever.com.



I posted the entire <Host> entry in case anyone finds the other portions informative (like how to enable the manager application for a virtual host).
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, this thread does belong in the Tomcat forum. So I am going to move this to that forum, so that you guys can continue the discussion there.

Mark
 
James Hodgkiss
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply.

I've checked out my server.xml files and they already have the line in that you gave me (with an additional resolveHosts="false"). But still no localhost_access_log files.

I notice I have two server.xml files. Could this be something to do with it? (Tomcat 5 can with the netbeans IDE I recently installed.) One server.xml file is at C:\Documents and Settings\jhodgski\.netbeans\3.6\jakarta-tomcat-5.0.19_base\conf. The other is at C:\Program Files\NetBeans3.6\jakarta-tomcat-5.0.19\conf.

Regards,
James
 
James Hodgkiss
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've even re-installed NetBeans/Tomcat 5 but still no access_logs?

Does anyone have any suggestions?

(Could this have anything to do with me having two server.xml files?)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic