Core directives

error_log directive

Selects the error log destination and minimum log severity. Context: main, http, mail, stream, server, location (where supported). Upstream documented default is logs/error.log error; packages may differ. This entry covers ordinary file logging, not all special destinations. Partial snippet.

Formal Syntax & Structure

nginx syntaxnginx
error_log file [level];

Parameters & Attributes

NameTypeDescription
filestringLog destination
levelstringSeverity such as notice, warn or error

Working Example

Example Snippetnginx
error_log logs/error.log notice;
Nginx Reference