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
| Name | Type | Description |
|---|---|---|
| file | string | Log destination |
| level | string | Severity such as notice, warn or error |
Working Example
Example Snippetnginx
error_log logs/error.log notice;