I second James' suggestion.  However, if you really want to use relative paths,
then you need to know what directory the VM is starting from.  This depends on
how you are starting Tomcat.  I'll assume you are using plain vanilla Tomcat,
not Tomcat bundled with JBoss or some other such package.

If you are starting using the .bat or .sh files, then (unless something's
changed recently), the VM should start from the CATALINA_HOME/bin directory. 
So, in your config file, you could refer to the logs directory using...

../logs/some.log

However, if you are using something like the Windows service, this does not
start the VM from the CATALINA_HOME/bin directory, but from the
C:\WINNT\system32 directory (You'll have to double check this, but I think this
is the default for Windows).  You can solve this issue by adding the following
to service.bat and then do a "service remove" and then "service install"...

set PR_STARTPATH=%CATALINA_HOME%\bin
set PR_STOPPATH=%CATALINA_HOME%\bin

That will normalize behavior to be equivalent to running from the .bat or .sh
files.


Jake

Quoting James Stauffer <[EMAIL PROTECTED]>:

> Use something like:
> ${catalina.home}/logs/some.log
>
> On 2/7/06, Zsolt <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I use logging-log4j-1.2.13 from tomcat-5.5.15. How can I use relative
> > filenames to get the log files under tomcat/logs?
> >
> > Zsolt
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> James Stauffer
> Are you good? Take the test at http://www.livingwaters.com/good/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to