Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Redirect Tomcat 7 console log output to a file (Windows)

Tags:

How do I redirect Tomcat 7 console log output to a file on Windows?

like image 321
Justin Kredible Avatar asked Jul 28 '11 16:07

Justin Kredible


People also ask

How do I view tomcat logs in Windows?

In Windows, you can change the Apache Tomcat log files using the configuration manager. Click on start and search “Configure Tomcat.” Navigate to the Logging Tab and select your logging level. NOTE: You may need to restart Apache Tomcat to apply the logging levels.

How do I read Tomcat logs?

Tomcat is a servlet container. By default, a Tomcat server is installed in the AO_HOME/tomcat directory on the computer where the the peer is installed. Tomcat logs are recorded in the AO_HOME/tomcat/logs directory where the peer is installed.

Where are Apache Tomcat logs?

The main Apache Tomcat configuration file is at /opt/bitnami/tomcat/conf/server. xml. Once Apache Tomcat starts, it will create several log files in the /opt/bitnami/tomcat/logs directory.

What is Tomcat Catalina log?

Catalina Log: This is the global log. It records information about events such as the startup and shutdown of the Tomcat application server, the deployment of new applications, or the failure of one or more subsystems.


1 Answers

Using catalina.bat run can start the tomcat in the current console instead of a new console , so you can redirect all the standard error and standard output stream of this command to a file using

catalina.bat run > tomcat.log 2>&1 
like image 107
Ken Chan Avatar answered Dec 02 '22 18:12

Ken Chan