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.

link|improve this question

69% accept rate
feedback

1 Answer

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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