From c7a1e6512d3b5f201943efc79bd43e00ab0424b0 Mon Sep 17 00:00:00 2001 From: Dominik Date: Sun, 14 Mar 2021 01:24:59 +0100 Subject: [PATCH] Stack driver fix: respect the defined processors This update fixes the issue: https://github.com/laravel/ideas/issues/1735 --- src/Illuminate/Log/LogManager.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Illuminate/Log/LogManager.php b/src/Illuminate/Log/LogManager.php index 0e0abcd67c33..ed6c418abc2d 100644 --- a/src/Illuminate/Log/LogManager.php +++ b/src/Illuminate/Log/LogManager.php @@ -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); } /**