• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

How to stdout using Tomcat8

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,

Iam using Tomcat 8.5 as web server for our Spring boot+batch war file.

In bin directory there are two Tomcat8w.exe(GUI based) and Tomcat8.exe(Console based).

When i start using Tomcat8w.exe stdout is printing on the logs folder like tomcat8-stdout.2019-11-07

But when i start using Tomcat8.exe console. Stdout is printing on the command window itself. Its not writing the logs to logs/tomcat8-stdout.2019-11-07.log.

How to enable/write logs to tomcat8-stdout.2019-11-07 file?

Appreciate if anyone helps.


Thank you,
Vinoth
 
Saloon Keeper
Posts: 21248
137
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The "catalina.out" file is actually just the stdout stream from the Tomcat JVM. When running Tomcat from the master control script (catalina.bat/catalina.sh), the script itself redirects this stream into TOMCAT_HOME/logs/catalina.out.

You're using Windows apps that wrap the actual Tomcat execution, so that makes things hard to follow, but this command should give you what you want:

 
vinoth sathi
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Thank for response.

As you said, Catalina.out is writing only server logs. Not stdout.

So, i cant print stdout to logs\tomcat8-stdout.2019-11-07.log using catalina.bat or Tomcat8.exe file?

Why tomcat is enabled stdout to Tomcat8w.exe ?

Please clarify.

Thank you.
 
Tim Holloway
Saloon Keeper
Posts: 21248
137
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just checked the Windows version (CATALINA.BAT) and they don't do things quite the same. For one thing, apparently the TOMCAT8 program logs by default to %SystemRoot%\System32\LogFiles\Apache.

I'm not that familiar with Tomcat under Windows. But generally they expect you to run Tomcat as a Windows Service.
 
If you two don't stop this rough-housing somebody is going to end up crying. Sit down and read this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!