cookie_limit_req_log_level

Sets the logging level for rate limiting errors and request delay indications in the cookie limit request module.

Syntaxcookie_limit_req_log_level level;
Defaulterror
Contexthttp, server, location
Arguments1

Description

The cookie_limit_req_log_level directive configures the logging level for events related to the cookie limit request module's activities. This applies particularly to scenarios where requests exceed the defined rate limits and result in either rejection or delays in processing. The logging level can be adjusted to provide different verbosity, allowing administrators to filter messages based on severity. For instance, setting it to info will record this in a less severe manner, while setting it to error will highlight these incidents as critical issues. The directive allows for customization of the log output and helps in monitoring abusive behaviors in the system.

When using the directive, it's essential to understand that the log level for delays is always set one level lower than that of refusals. For instance, if cookie_limit_req_log_level notice is specified, any requests that are delayed would be logged at the info level. This tiered approach helps maintain a clean and meaningful logging strategy, facilitating easier management of log files and quicker identification of issues.

This directive can be applied in various contexts including http, server, and location, giving flexibility to apply logging at different configurations. The granularity allows for isolating logging behavior based on the specific needs of the server or application, which is particularly useful in complex NGINX setups where different locations may require different handling of rate-limited requests.

Config Example

http {
    cookie_limit_req_log_level warn;
}

Ensure the logging level is appropriate for your production environment to avoid excessive log generation.

Remember that the delay logging level is always one level lower than the refusal logging level, which can affect log clarity.

Test your configuration changes on a staging instance before applying to production to verify logging behavior.

← Back to all directives