You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Chris Campbell <cc...@quaris.com> on 2007/05/09 21:30:55 UTC

Windows Service and Logging

Logging (log4j) works fine for my servlets in Tomcat 5.5 until I run
Tomcat as a service on windows, in which case I only get stdout, stderr
and jakarta_service logs.

The FAQ on the apache tomcat site has an entry for this problem, but the
link to its solution in the archives is broken, and I cannot find the
question in the archives.

Can someone point me to the right link or give me the solution?

Thanks in advance

Chris




---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Windows Service and Logging

Posted by Chris Campbell <cc...@quaris.com>.
I found a solution if anyone is interested ( and maybe its the solution
at the broken link in the FAQ? )

When I first setup my log4j appenders I used relative paths from the
tomcat bin directory to the logs directory ( silly me )

I had log4j.appender.server.file=../logs/server.log

which works fine with the startup.bat, but the windows service seems to
need the full path, so following the convention in logging.properties :

log4j.appender.server.file=${catalina.base}/logs/server.log

And now Tomcat running as windows service writes out the log files I
have configured.

Chris Campbell wrote:
> Logging (log4j) works fine for my servlets in Tomcat 5.5 until I run
> Tomcat as a service on windows, in which case I only get stdout, stderr
> and jakarta_service logs.
> 
> The FAQ on the apache tomcat site has an entry for this problem, but the
> link to its solution in the archives is broken, and I cannot find the
> question in the archives.
> 
> Can someone point me to the right link or give me the solution?
> 
> Thanks in advance
> 
> Chris
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org