Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How can I instruct Tomcat to hold log files for each virtual host and app separately, similar to:

${tomcat.home}/logs/vhost-app-date.log

This is under the assumption that I configure all virtual hosts to log to the console, and they are unaware of the virtual host and application name they're running under.

share|improve this question

1 Answer 1

take a look at this as a starting point: http://tomcat.apache.org/tomcat-5.5-doc/config/host.html

It seems you have to change to log4j and configure it there.

If you only want different access logs it is really straight forward: http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html

I have not tried it with virtual hosts by myself, I use different instances.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.