Home  >  Article  >  Operation and Maintenance  >  How to close error_log log in nginx

How to close error_log log in nginx

王林
王林forward
2023-05-16 18:01:131335browse

Configuration parameter format: error_log /path/to/log level;

Nginx error log level

Common error log levels include debug | info | notice | warn | error | crit | alert | emerg

The higher the level, the less information is recorded. If not defined, the default level is error.

It can be configured in main, http, server, location paragraph.

If two error_logs are defined in the configuration file, they will conflict in the same configuration section, so only one error_log is allowed to be configured in the same section.

However, it is okay to appear in different configuration sections.

Nginx error log example

error_log /var/log/nginx/error.log crit;

If you want to completely close error_log, you need to configure it like this

error_log /dev/null;

The above is the detailed content of How to close error_log log in nginx. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:yisu.com. If there is any infringement, please contact admin@php.cn delete