triplodrindl
triplodrindl

Reputation: 23

Where to see "console output" from Servlet when in Tomcat?

I had a JavaSE app with main() method. I need to run it in a cloud. A good choice is Jelastic. So I converted my project to Dynamic Web project (Project Facets in Eclipse), created a ServletContextListener and put all my code from main() in that Servlet contextInitialized() method. My code has System.out.println and logging (slf4j) statements - In my Eclipse IDE I see all that output in console view. But as I deploy the project in Tomcat in the cloud - I am totally lost where too look for console output. I guess it is somewhere in the logs, but I cannot find those logs...

Upvotes: 0

Views: 1009

Answers (2)

Ruslan
Ruslan

Reputation: 395

If you are looking for tomcat logs in Jelastic then just hover on the application server and press "Log" button.

Tomcat Logs in Jelastic

Upvotes: 1

Akhadra
Akhadra

Reputation: 419

Tomcat doesn't redirect the console logs to a file, to do that you need to use logging tools like log4j for example, or once you start your tomcat you can redirect the output to a file check this and this for more information.

Upvotes: 0

Related Questions