All,

Apologies if I've missed the answer to this in the Logging HowTo, the FAQ, or Andre's collection of the logging discussion.

Env:  TC 6.0.18 + Java 1.5

The issue: I want to have several instances of the same webapp running on the same Tomcat as myapp1, myapp2, etc.
That's easy.

I'm going to be using log4j, probably with properties files, but xml would be ok too. I'd like to have log files named mylog.log appear in ${catalina.home}/ logs looking like

    myapp1-mylog.log    myapp2-mylog.log    ... etc.

I could hardwire this in separte log4j.properties files for each myapp instance, something like this:

log4j.appender.myLogFile.File=${catalina.home}/logs/myapp1-mylog.log
log4j.appender.myLogFile.File=${catalina.home}/logs/myapp2-mylog.log

And using ant to build my war files, I could hide this ugliness, just copying such hardwired files into the war being built. But is there any parameter syntax that would allow me to grab the context name and write one log4j.properties with something like this:

log4j.appender.myLogFile.File=${catalina.home}/logs/${context-name}- mylog.log ??

Thanks,
Ken


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to