2009/9/22 Nishant Chandra <nishant.chan...@gmail.com>:
> I want to use Log4j and log from different web apps to one directory -
> tomcat_home/output/logs/{webapp_context}_service.log
>
> What should be the configuration in log4j.properties?
> I am currently using
> log4j.appender.xml.file=${catalina.base}/output/logs/service.log
>
> What I want is to append app_context in the file name.

IIRC, there is no way to obtain the application context path as an
environment variable.
You should configure Log4j using its APIs, using a ServletContextListener.
Probably the best way is to load the "log4j.properties" file and
modify only the property that refers to the path of the file, then
configure Log4j.

Antonio

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

Reply via email to