Dear Tomcat Users,

Apologies if this is more of a log4j question, but I thought that I'd start 
here, in case Tomcat has any easy remedies.

I have a common webapp that I deploy to multiple, different contexts.

In, I have a few different log files defined, e.g., for logins:

log4j.appender.logins.layout.ConversionPattern=[%d{MM/dd/yyyy HH:mm:ss}] [%p] 
[%C{1}]: %m%n, logins, logins

However, as you may have guessed, if I have the same log4j configuration file 
for each context, the contexts tend to over-write each other.

Is there any way to have the SAME deployed too multiple 
contexts play nicely and not overwrite each other, but merely append each other?

Extra credit question (although sounds even more like a log4j question, so 
apologies): If not, is there any way to define the file path, e.g.:


to include the specific context?  I have found a few references on the 'Net, 
e.g., ${contextPath}, ${servletName}, etc., which don't seem to work.

My goal (desire?) is to have the same webapp and configuration and web.xml and, etc., deployed to every web context, but not have one context 
overwrite another content's entries.

Of course, as the Mick once said, "You can't always have what you want".

Please let me know if this is possible.



Reply via email to