Home » Windows » Let the Windows under Tomcat log the console infor...

Let the Windows under Tomcat log the console information to the log

let Windows under the Tomcat console information recorded in the log, there is a friend in need of reference.




Disadvantages:



1. after output to the log log, do not print to console.



2.log files have been growing, that is, files are getting bigger and bigger,.







In the Linux system, Tomcat after the start of default will much of the information is written to the catalina.out file, we can track the operation of Tomcat and related applications through the tail -f catalina.out. In windows, we use startup.bat to start Tomcat, Catalina and Linux will find the log records are very different, mostly only to output information the screen and no record to catalina.out. The content of this paper is to be implemented in windows, will be related to the background of the console output records in the catalina.out file for future view. About how to realize the method of tail command function similar to Linux in Windows2003, see < / a> a paper



Output the console information to%CATALINA_BASE%logscatalina.out:






1, open the startup.bat file below bin, and put the call "%EXECUTABLE%" start%CMD_LINE_ARGS%

instead of "call", "%EXECUTABLE%", "run", "%CMD_LINE_ARGS%", ".
"
2, open the catalina.bat file below bin, will find a total of 4%ACTION%, and in the back with

>%CATALINA_HOME%logscatalina.out.

restart tomcat, you will find in the logs folder appeared under the catalina.out file, the original console information written in all,.

, but the output of this catalina.out file has been growing, that is, the file will become larger and larger,.









Latest