• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Unable to make tomcat log 404 type error messages.

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I need the log where tomcat puts 404 type errors.
I am using: tomcat 6 on Centos 5.2

I have been getting 404 errors in applications deployed on tomcat. I was unable to find the logs where tomcat puts messages when it is unable to find requested files and other simple errors.
- I am not talking about stuff logged by applications, just 404 type stuff.

I checked <tomcat>/logs and found following types of files
catalina.out : contains startup and shutdown messages (mostly INFO messages)
catalina.<year-mm-dd>.log : contains same data as above file for its date
host-manager.year-mm-dd.log : empty (Seems to be meant for tomcat manger, I have not been using that)
localhost.year-mm-dd.log : some application related log message (org.apache.catalina.core.ApplicationContext... INFO messages)
manager.year-mm-dd.log : empty

So, none of these contain the 404 errors. Since I installed tomcat by simply unpacking it in /usr/share I'm pretty sure it has no logs in /var/log (I checked and nothing for catlina or tomcat).
Any ideas?

Thanks

 
sun neel
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I thought maybe the problem is not of finding the log but making tomcat log these errors. So I tried the following

I searched and found that a valve can be configured in <tomcat>/conf/server.xml for similar purposes but I only able to log incoming request.

This created the file <tomcat>/logs/localhost_access_log.txt which contains details of requests coming in e.g.


Still I could not get the 404 file not found errors in log.
 
sun neel
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I read about <tomcat>/conf/logging.properties
http://tomcat.apache.org/tomcat-6.0-doc/logging.html
It seems to be more relevant to logging done inside applications, still I set catalina logging to FINEST with:

Can anyone tell me how to get tomcat to log its 404 error and where to find them.
I remember apache logs contain the requested url, path of local file searched for and not found and that a 404 has been sent - all in the same message. For starters I am most interested in the "path of local file searched for and not found" part.

 
Ranch Hand
Posts: 470
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why you do not like this line? It looks like 404 error for me

 
sun neel
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Misha the line contains the request url

I need the the path of file that was searched for and not found.

 
You ought to ventilate your mind and let the cobwebs out of it. Use this cup to catch the tiny ads:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic