1

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.

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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