Skip to content

Commit

Permalink
Fix BacktraceProcessor
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandre-daubois committed Nov 7, 2023
1 parent 0283396 commit e58392e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/BacktraceProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
*/
final class BacktraceProcessor extends AbstractThresholdProcessor
{
private const MONOLOG_VENDOR_DIRNAME = 'vendor/monolog/monolog';

protected function process(LogRecord $record): LogRecord
{
$trace = \debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS);
Expand All @@ -27,7 +29,7 @@ protected function process(LogRecord $record): LogRecord
}

$class = $call['class'] ?? null;
if ( \str_starts_with($class, 'Monolog\\') || \str_starts_with($class, 'MonologProcessorCollection\\')) {
if (\str_contains($file, self::MONOLOG_VENDOR_DIRNAME) || \str_starts_with($class, 'MonologProcessorCollection\\')) {
continue;
}

Expand Down

0 comments on commit e58392e

Please sign in to comment.