Logging when Tomcat is installed as a service

P

Peter Rank

Hi all,

I've running Tomcat 5.5 and I'm using the standard java logging.
When I start tomcat from command-line everything works fine. Everyday
I got a new juliXXX.log file in my log directory.
In catalina.bat I have the following entry:
set JAVA_OPTS=%JAVA_OPTS% -
Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -
Djava.util.logging.ocnfig.file="${catalina.base}\conf
\logging.properties"

Now I want to run tomcat as a service but all I got in the log-
directory is the complete output in stdout_XXX.log file.
How can I tell tomcat, that it should use the logging.properties I
described above.

I tried to set the options above via script or the tomcat5w
application but it does not have any impact.

In my script I set the following options:

"%EXECUTABLE%" //US//%SERVICE_NAME% ++JvmOptions "-
Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"

"%EXECUTABLE%" //US//%SERVICE_NAME% ++JvmOptions "-
Djava.util.logging.config.file=C:\logging.properties"

Am I totally wrong?

Thanks
Peter
 
A

Arne Vajhøj

Peter said:
I've running Tomcat 5.5 and I'm using the standard java logging.
When I start tomcat from command-line everything works fine. Everyday
I got a new juliXXX.log file in my log directory.
In catalina.bat I have the following entry:
set JAVA_OPTS=%JAVA_OPTS% -
Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -
Djava.util.logging.ocnfig.file="${catalina.base}\conf
\logging.properties"

Now I want to run tomcat as a service but all I got in the log-
directory is the complete output in stdout_XXX.log file.
How can I tell tomcat, that it should use the logging.properties I
described above.

I don't think it uses catalina.bat when running as a service.

http://tomcat.apache.org/tomcat-5.5-doc/windows-service-howto.html

should guide you on how to do it.

Arne
 
P

Peter Rank

I don't think it uses catalina.bat when running as a service.

I know and I've also read the howto documents.
The catalina.bat is used when I start tomcat with the startup.bat. And
if I do this my logging works.
But when I switch to run tomcat as a service everything is written in
one big file (stdoutXX.log).
What do I have to configure to force tomcat to log as it is described
in my logging.properties?
I've tried to set the JVM parameters Djava.util.logging.manager and
Djava.util.logging.config.file with tomcat5w but it works as befoe.

Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top