Nginx Logging

Nginx uses a few different directives to control system logging. The one included in the core module is called error_log. error_log directive Syntax: error_log log_file log_level. log_file: specifies the file where the logs will be written. log_level: specifies the lowest level of logging to be recorded. Logging levels emerg: emergency situations. alert: crit: error: warn: notice: info debug: Example: error_log /var/log/nginx/error.log crit; # Don't log anything error_log /dev/null crit; error_log is part of the core module; the access_log is part of the HttpLogModule....

May 20, 2023 · 1 min · 193 words · by Loknath