Conditions | 1 |
Paths | 1 |
Total Lines | 20 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
16 | public function __invoke(array $options) |
||
17 | { |
||
18 | $client = $this->getClient($options); |
||
19 | $index = (string) ($options['index'] ?? 'monolog'); |
||
20 | $type = (string) ($options['type'] ?? 'record'); |
||
21 | $ignoreError = (boolean) ($options['ignoreError'] ?? false); |
||
22 | $level = (int) ($options['level'] ?? Logger::DEBUG); |
||
23 | $bubble = (boolean) ($options['bubble'] ?? true); |
||
24 | |||
25 | return new ElasticSearchHandler( |
||
26 | $client, |
||
27 | [ |
||
28 | 'index' => $index, |
||
29 | 'type' => $type, |
||
30 | 'ignore_error' => $ignoreError |
||
31 | ], |
||
32 | $level, |
||
33 | $bubble |
||
34 | ); |
||
35 | } |
||
36 | } |
||
37 |