Filter
rpress_api_log_requests
On this page
Filters whether API requests are logged.
Runs in RPRESS_API::log_requests(), which is checked before each API request is written to the logs. Return false to turn request logging off, for instance on high-traffic sites.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$value | bool | Whether logging is enabled; passed as true by default. |
Return value#
bool. True to log API requests, false to skip logging.
Example#
function my_disable_api_request_logging( $log_requests ) {
return false;
}
add_filter( 'rpress_api_log_requests', 'my_disable_api_request_logging', 10, 1 );
Source#
Applied in:
includes/api/class-rpress-api.php(line 1831), inRPRESS_API::log_requests()includes/class-rpress-api.php(line 105), inRPRESS_API::__construct()
Was this page helpful?
