Where is Tomcat Console Output on Windows

2019-01-28 01:51发布

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.

3条回答
劳资没心,怎么记你
2楼-- · 2019-01-28 02:10

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.

查看更多
Evening l夕情丶
3楼-- · 2019-01-28 02:28

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++
查看更多
祖国的老花朵
4楼-- · 2019-01-28 02:34

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.

查看更多
登录 后发表回答