Skip to content

Commit

Permalink
Stack driver fix: respect the defined processors (#36591)
Browse files Browse the repository at this point in the history
This update fixes the issue: laravel/ideas#1735
  • Loading branch information
DominikStyp authored Mar 15, 2021
1 parent e2f6fe6 commit d8686ac
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion LogManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,12 +244,16 @@ protected function createStackDriver(array $config)
$handlers = collect($config['channels'])->flatMap(function ($channel) {
return $this->channel($channel)->getHandlers();
})->all();

$processors = collect($config['channels'])->flatMap(function ($channel) {
return $this->channel($channel)->getProcessors();
})->all();

if ($config['ignore_exceptions'] ?? false) {
$handlers = [new WhatFailureGroupHandler($handlers)];
}

return new Monolog($this->parseChannel($config), $handlers);
return new Monolog($this->parseChannel($config), $handlers, $processors);
}

/**
Expand Down

0 comments on commit d8686ac

Please sign in to comment.