# boolean_smtp_log_mailer_resolved_to_error_log

> Filters whether the resolved mailer diagnostics are written to the plugin log.

Filter · Tier C · Since 1.0.0

Return false to suppress the log line for this send.

## Signature

```php
add_filter( 'boolean_smtp_log_mailer_resolved_to_error_log', $callback, 10, 2 );
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `$logToPhpErrorLog` | `bool` | Whether to log the diagnostics; reflects the log_mailer_diagnostics setting by default. |
| `$diagnostics` | `array<string, mixed>` | Diagnostic snapshot that would be logged. |

**Returns** `bool` — Whether to log the resolved mailer to the PHP error log.

## Fires in

- [app/Services/Mailer/MailerManager.php:1265](https://github.com/booleanpress/boolean-smtp-src/blob/main/app/Services/Mailer/MailerManager.php#L1265) — `BooleanSmtp\Services\Mailer\MailerManager::emitMailerDiagnostics()`

## Example

```php
add_filter( 'boolean_smtp_log_mailer_resolved_to_error_log', function ( bool $logToPhpErrorLog, array $diagnostics ) {
    return $logToPhpErrorLog;
}, 10, 2 );
```
