Tomcat does not print project logs in Windows environment

Running tomcat in the windows environment finds that the project does not output logs, which can be set by the following method.
1. Open the startup.bat file in the bin file of the tomcat installation directory
2. Find the call “%EXECUTABLE%” start %CMD_LINE_ARGS% in the file and replace it with call “%EXECUTABLE%” run %CMD_LINE_ARGS%
insert image description here

3. Open the catalina.bat file in the bin directory, find the four %ACTION% inside, and add >> %CATALINA_HOME%\logs\catalina.out at the end
insert image description here
4. Restart tomcat, check the catalina.out file in the logs directory, and find that there are The project log is output.
insert image description here

5. However, such long-term printing will cause the catalina.out file to become larger and larger. The solution is to divide the files by date. The operation steps are to add .%date: 0,4%-%date: 5,2%-%date:~8,2%
when modifying catalina.out in the third step, such as: %ACTION% >> % CATALINA_HOME%\logs\catalina.out.%date: 0,4%-%date: 5,2%-%date:~8,2%

insert image description here

Guess you like

Origin blog.csdn.net/qq_37131111/article/details/130841407