# boolean_smtp_debug_should_log_http

> Filters whether an outgoing HTTP request/response is recorded to the debug log.

Filter · Tier C · Since 1.0.0



## Signature

```php
add_filter( 'boolean_smtp_debug_should_log_http', $callback, 10, 4 );
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `$shouldLog` | `bool` | Whether to log this exchange. Default true. |
| `$url` | `string` | The request URL. |
| `$parsedArgs` | `array<string, mixed>` | The request arguments passed to wp_remote_request(). |
| `$response` | `mixed` | The response array or a WP_Error. |

**Returns** `bool` — Whether to log the exchange.

## Fires in

- [app/Support/Debug/WordPressDebugLogger.php:712](https://github.com/booleanpress/boolean-smtp-src/blob/main/app/Support/Debug/WordPressDebugLogger.php#L712) — `BooleanSmtp\Support\Debug\WordPressDebugLogger::onHttpApiDebug()`

## Example

```php
add_filter( 'boolean_smtp_debug_should_log_http', function ( bool $shouldLog, string $url, array $parsedArgs, $response ) {
    return $shouldLog;
}, 10, 4 );
```
