Logging when Tomcat is installed as a service

Discussion in 'Java' started by Peter Rank, Jul 8, 2008.

  1. Peter Rank

    Peter Rank Guest

    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
    Peter Rank, Jul 8, 2008
    #1
    1. Advertising

  2. Peter Rank

    Arne Vajhøj Guest

    Peter Rank wrote:
    > 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
    Arne Vajhøj, Jul 8, 2008
    #2
    1. Advertising

  3. Peter Rank

    Peter Rank Guest


    > 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
    Peter Rank, Jul 9, 2008
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Learner
    Replies:
    4
    Views:
    2,062
    Learner
    Jan 27, 2006
  2. Stefan Siegl
    Replies:
    0
    Views:
    941
    Stefan Siegl
    Aug 27, 2003
  3. hocho888
    Replies:
    1
    Views:
    611
  4. Rakesh Pandit
    Replies:
    0
    Views:
    494
    Rakesh Pandit
    Jul 12, 2005
  5. Replies:
    3
    Views:
    440
    Jason
    Apr 28, 2008
Loading...

Share This Page