scratch – Blame information for rev
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
115 | office | 1 | <?php |
2 | |||
3 | /* |
||
4 | * This file is part of the Monolog package. |
||
5 | * |
||
6 | * (c) Jordi Boggiano <j.boggiano@seld.be> |
||
7 | * |
||
8 | * For the full copyright and license information, please view the LICENSE |
||
9 | * file that was distributed with this source code. |
||
10 | */ |
||
11 | |||
12 | namespace Monolog\Handler; |
||
13 | |||
14 | /** |
||
15 | * Forwards records to multiple handlers suppressing failures of each handler |
||
16 | * and continuing through to give every handler a chance to succeed. |
||
17 | * |
||
18 | * @author Craig D'Amelio <craig@damelio.ca> |
||
19 | */ |
||
20 | class WhatFailureGroupHandler extends GroupHandler |
||
21 | { |
||
22 | /** |
||
23 | * {@inheritdoc} |
||
24 | */ |
||
25 | public function handle(array $record) |
||
26 | { |
||
27 | if ($this->processors) { |
||
28 | foreach ($this->processors as $processor) { |
||
29 | $record = call_user_func($processor, $record); |
||
30 | } |
||
31 | } |
||
32 | |||
33 | foreach ($this->handlers as $handler) { |
||
34 | try { |
||
35 | $handler->handle($record); |
||
36 | } catch (\Exception $e) { |
||
37 | // What failure? |
||
38 | } catch (\Throwable $e) { |
||
39 | // What failure? |
||
40 | } |
||
41 | } |
||
42 | |||
43 | return false === $this->bubble; |
||
44 | } |
||
45 | |||
46 | /** |
||
47 | * {@inheritdoc} |
||
48 | */ |
||
49 | public function handleBatch(array $records) |
||
50 | { |
||
51 | foreach ($this->handlers as $handler) { |
||
52 | try { |
||
53 | $handler->handleBatch($records); |
||
54 | } catch (\Exception $e) { |
||
55 | // What failure? |
||
56 | } catch (\Throwable $e) { |
||
57 | // What failure? |
||
58 | } |
||
59 | } |
||
60 | } |
||
61 | } |