Modify the Startup.bat file in Tomcat's Bin directory,
Put 42 lines of:
Call "%executable%" Start%cmd_line_args%
To
Call "%executable%" Run%cmd_line_args% >>. \logs\wudengke213.log
or instead
Call "%executable%" Run%cmd_line_args% >>. \logs\console.%date:~0,10%.log
The first way is to produce only one log file, the second is a log file every day
%date:~0,10% is the system time interception, some systems may not be such interception, you can use the Echo%date% command to look at the results, 0 is the starting position, 10 o'clock length, according to the results to intercept.
The purpose of adding this line is to have Tomcat output the console's information to
.. \logs\xxx_%date:~0,10%.log
This file, but the console does not output, this is his shortcoming, but if it is in the user environment deployment, the console output is not important
3. The above approach cannot be entered into a file on a daily basis, and the second method can only be output to different files when you restart Tomcat on a different date, such as restarting the system on the same day, or the same log file.