With errors
By default, when an error occurs, recent log entries are included alongside the error report. This gives you context about what happened before the error.
You can configure the maximum number of logs and the minimal level for logs included with errors:
use Monolog\Level;
$config->collectLogsWithErrors(
maxItems: 100,
minimalLevel: Level::Warning,
);
To disable logs with errors:
$config->ignoreLogsWithErrors();