You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Tim Davidson <ti...@greenhatconsulting.com> on 2003/08/12 12:39:02 UTC
Newbie how to place logfile under tomcat logs
Hi,
this may be more a tomcat question so appologies if it is off-topic.
I want to plcae the log file under %TOMCAT_HOME%\logs (where all the tomcat logs go).
I have defined in web.xml:
<servlet>
<servlet-name>MyServlet</servlet-name>
<servlet-class>foo.bar.MyServlet</servlet-class>
<init-param>
<param-name>logfile</param-name>
<param-value>logs.txt</param-value>
</init-param>
</servlet>
and in the servlet:
String logFile = getInitParameter("logfile");
appender = new FileAppender(layout, logFile);
How can I change this to put the log file under tomcat\logs without hard coding the path?
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org