Passed
Pull Request — master (#104)
by Anton
13:25
created

LogDependencyProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 11
dl 0
loc 25
c 0
b 0
f 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getLogHandlers() 0 5 1
A getProcessors() 0 9 1
1
<?php
2
3
/**
4
 * This file is part of the Spryker Commerce OS.
5
 * For full license information, please view the LICENSE file that was distributed with this source code.
6
 */
7
8
namespace Pyz\Glue\Log;
9
10
use Spryker\Glue\Log\LogDependencyProvider as SprykerLogDependencyProvider;
11
use Spryker\Glue\Log\Plugin\Handler\ExceptionStreamHandlerPlugin;
12
use Spryker\Glue\Log\Plugin\Handler\StreamHandlerPlugin;
13
use Spryker\Glue\Log\Plugin\Processor\EnvironmentProcessorPlugin;
14
use Spryker\Glue\Log\Plugin\Processor\GuzzleBodyProcessorPlugin;
15
use Spryker\Glue\Log\Plugin\Processor\PsrLogMessageProcessorPlugin;
16
use Spryker\Glue\Log\Plugin\Processor\RequestProcessorPlugin;
17
use Spryker\Glue\Log\Plugin\Processor\ResponseProcessorPlugin;
18
use Spryker\Glue\Log\Plugin\Processor\ServerProcessorPlugin;
19
20
class LogDependencyProvider extends SprykerLogDependencyProvider
21
{
22
    /**
23
     * @return array<\Monolog\Handler\HandlerInterface>
24
     */
25
    protected function getLogHandlers(): array
26
    {
27
        return [
28
            new StreamHandlerPlugin(),
29
            new ExceptionStreamHandlerPlugin(),
30
        ];
31
    }
32
33
    /**
34
     * @return array<\Spryker\Shared\Log\Dependency\Plugin\LogProcessorPluginInterface>
35
     */
36
    protected function getProcessors(): array
37
    {
38
        return [
39
            new PsrLogMessageProcessorPlugin(),
40
            new EnvironmentProcessorPlugin(),
41
            new ServerProcessorPlugin(),
42
            new RequestProcessorPlugin(),
43
            new ResponseProcessorPlugin(),
44
            new GuzzleBodyProcessorPlugin(),
45
        ];
46
    }
47
}
48