Live view of Tomcat run logs under "Tomcat" Linux

Source: Internet
Author: User

Today, when deploying a project to a Linux server, it has been an error, but there is no record in the log file. But there was no error in the local test, there was no error on the Windoesserver server, there was no reason to find it, so I wanted to see the running logs of Tomcat in real time.

  

1, first switch to: cd usr/local/tomcat5/logs2-F Catalina.out3, so the runtime can view the running log in real time

CTRL + C is the exit Tail command.

Alt+e+r Reset.

By the way, the tail command tail command in Linux writes the file to standard output starting at the specified point. Using the-f option of the tail command makes it easy to see which log file is being changed, and tail-f filename will display the most trailer in filename on the screen. And not only refreshes, so you see the latest file content. 1. command format; tail[necessary parameters [selection parameters] [file] 2. Command function: used to display the end of the specified file, do not specify the file, as input information for processing. Common view log files. 3. Command parameter:-F Loop Read-Q does not display processing information-v displays verbose processing information-c< number > bytes displayed-n< lines > Display rows--pid=pid is combined with-F to end after the process id,pid dead. -Q,--quiet,--silent never outputs the header-S of the file name,--sleep-interval=s and-F are combined to indicate a sleep s-second interval of 4 per repetition . Use instance: Instance 1: Show the last 5 lines of the file command:tail-n 5 Log2017.log

Live view of Tomcat run logs under "Tomcat" Linux

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.