Nginx error_log error log level and error log configuration, shutdown error log description

Source: Internet
Author: User

Nginx installed after the general is to configure access log and error log, which access log we do not say here, you can refer to the previous article. Here is the main description of Nginx error log, this is known to all, open the log is mainly to troubleshoot problems.
1, error log level
Error_log level is divided into debug, info, notice, warn, error, crit default for Crit, the format is as follows:
Error_log/your/path/error.log Crit;
Crit Records have the fewest logs, and debug logs the most. Please choose the configuration log level according to the actual situation. The configuration level is low, too much information is useless, and the level is too high to easily troubleshoot problems. The recommendation remains the default.

2, error Log off
Error_log off or leave a comment, the error log will still be logged. If you need to completely shut down, you need to throw it into a black hole, for example:
Error_log/dev/null Crit;

3, Configuration segment: Main, HTTP, server, location.

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.