To make a long story short, there are many ways to display the Tomcat logs on a Web page, which can be achieved by using different software, but the simplest is to be done in a few local commands.
The same partition can be implemented with hard links.
First look at your Web root directory: Vim tomcat/conf/server.xml find the <context docbase= "* * * * * * * * * * * * * * * * and enter its root directory, execute ln/usr/local/tomcat/logs in the root directory. /catalina.out. This will generate a catalina.out link file in your current directory, and restarting Tomcat can be done by entering it in the browser: IP address: 8080/catalina.out.
Soft Connection Implementation Method
Enter the Tomcat/conf/context.xml to change <Context> into
<context allowlinking= "true" > otherwise it won't show up in the webpage.
If the log file is too large to specify how many rows to look at, then do a scheduled task:
*/1 * * * * tail-n 200/usr/local/tomcat/logs/catalina.out >/web root directory/link file name
This means that every minute the log file is updated to the specified link file
This article is from the "11422312" blog, please be sure to keep this source http://11432312.blog.51cto.com/11422312/1793666
Make the Tomcat log Web page appear