6

I used to start tomcat from its bin folder with the startup.bat. By running that script it opened a java window in which I can see the outputs from tomcat. However, I've been told that this is not the right way to start tomcat on a windows server. Therefore I start tomcat now over the service program. By doing so no java window is being opened anymore and therefore I can't see the output msg from tomcat.

I have also looked into the logs folder of tomcat. Those saved outputs are not the same as the one I had/have in java window. Does anyone know where I can find those outputs?

Many thanks in advance for any advices.

4 Answers 4

9

If we assume your install is in C:\program files\apache software foundation\apache-tomcat{ver}\

then it is inside, in the log directory, in a file catalina.out.

C:\program files\apache software foundation\apache-tomcat{ver}\logs\catalina.out

It's worth to note the name of the file depends on your configuration, also the name of the logs directory can be different depending on configuration but I assume you preserved default config.

3
  • 2
    There I have for example a file catalina.2011-12-02.log. But this does not contain the same information as the java output window...
    – mkn
    Dec 2, 2011 at 20:43
  • Is it possible that besides the catalina.2011-12-02.log you have files that are named localhost{foo}.log and manager{foo}.log? I am pretty sure the combination of those files would be exactly what you would normally see in your java console, unless your tomcat is configured otherwise. Dec 2, 2011 at 20:52
  • 2
    The problem was that Tomcat didn't have the rights to write all the logs in the User's folder. I changed that and now I can also see stout log files.
    – mkn
    Dec 10, 2011 at 8:23
4

In Windows (I am using Windows 10) you should do these to check the running application's logs:-

  1. Install Notepad++
  2. Open C:\Program Files\Apache Software Foundation\Tomcat {ver}\logs\tomcat{ver}-stdout.{date}.log in Notepad++
  3. Open View menu and enable 'Monitoring' in Notepad++
1

Usually the logs should be in $TOMCAT_HOME/logs

When running tomcat as a service, i have noticed that Tomcat sometimes generated logs in the folder where tomcat was started from so also check $TOMCAT_HOME/bin for any possible log files.

This is why you should configure Log4j so that you have control of where the log files are created.

0

There is no such thing. There is no catalina.out on MS Windows. On MS there is catalina-datetime-in-some-random-format.log but that is NOT catalina.out nor does it contain same information.

On a real operating systems there is catalina.out that contains all output from JVM both stdout and stderr. On MS windoh! ;) it is just a log file for Tomcat JUL log file (not CONSOLE/stdout/stderr). Then there are catalina-stdout.log and catalina-stderr.log files. So every single time you need to find some information on M$ you have dig through all three files. Most of contain duplicate information making it absolute hell to try to process the logs via any automation like ELK stack.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.