|
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\Log\AuditLogMetaDataProcessorPlugin; |
|
14
|
|
|
use Spryker\Glue\Log\Plugin\Log\AuditLogRequestProcessorPlugin; |
|
15
|
|
|
use Spryker\Glue\Log\Plugin\Log\AuditLogTagFilterBufferedStreamHandlerPlugin; |
|
16
|
|
|
use Spryker\Glue\Log\Plugin\Processor\EnvironmentProcessorPlugin; |
|
17
|
|
|
use Spryker\Glue\Log\Plugin\Processor\GuzzleBodyProcessorPlugin; |
|
18
|
|
|
use Spryker\Glue\Log\Plugin\Processor\PsrLogMessageProcessorPlugin; |
|
19
|
|
|
use Spryker\Glue\Log\Plugin\Processor\RequestProcessorPlugin; |
|
20
|
|
|
use Spryker\Glue\Log\Plugin\Processor\ResponseProcessorPlugin; |
|
21
|
|
|
use Spryker\Glue\Log\Plugin\Processor\ServerProcessorPlugin; |
|
22
|
|
|
|
|
23
|
|
|
class LogDependencyProvider extends SprykerLogDependencyProvider |
|
24
|
|
|
{ |
|
25
|
|
|
/** |
|
26
|
|
|
* @return array<\Monolog\Handler\HandlerInterface> |
|
27
|
|
|
*/ |
|
28
|
|
|
protected function getLogHandlers(): array |
|
29
|
|
|
{ |
|
30
|
|
|
return [ |
|
31
|
|
|
new StreamHandlerPlugin(), |
|
32
|
|
|
new ExceptionStreamHandlerPlugin(), |
|
33
|
|
|
]; |
|
34
|
|
|
} |
|
35
|
|
|
|
|
36
|
|
|
/** |
|
37
|
|
|
* @return list<\Spryker\Shared\Log\Dependency\Plugin\LogHandlerPluginInterface> |
|
38
|
|
|
*/ |
|
39
|
|
|
protected function getGlueSecurityAuditLogHandlerPlugins(): array |
|
40
|
|
|
{ |
|
41
|
|
|
return [ |
|
|
|
|
|
|
42
|
|
|
new AuditLogTagFilterBufferedStreamHandlerPlugin(), |
|
43
|
|
|
]; |
|
44
|
|
|
} |
|
45
|
|
|
|
|
46
|
|
|
/** |
|
47
|
|
|
* @return list<\Spryker\Shared\Log\Dependency\Plugin\LogHandlerPluginInterface> |
|
48
|
|
|
*/ |
|
49
|
|
|
protected function getGlueBackendSecurityAuditLogHandlerPlugins(): array |
|
50
|
|
|
{ |
|
51
|
|
|
return [ |
|
|
|
|
|
|
52
|
|
|
new AuditLogTagFilterBufferedStreamHandlerPlugin(), |
|
53
|
|
|
]; |
|
54
|
|
|
} |
|
55
|
|
|
|
|
56
|
|
|
/** |
|
57
|
|
|
* @return array<\Spryker\Shared\Log\Dependency\Plugin\LogProcessorPluginInterface> |
|
58
|
|
|
*/ |
|
59
|
|
|
protected function getProcessors(): array |
|
60
|
|
|
{ |
|
61
|
|
|
return [ |
|
62
|
|
|
new PsrLogMessageProcessorPlugin(), |
|
63
|
|
|
new EnvironmentProcessorPlugin(), |
|
64
|
|
|
new ServerProcessorPlugin(), |
|
65
|
|
|
new RequestProcessorPlugin(), |
|
66
|
|
|
new ResponseProcessorPlugin(), |
|
67
|
|
|
new GuzzleBodyProcessorPlugin(), |
|
68
|
|
|
]; |
|
69
|
|
|
} |
|
70
|
|
|
|
|
71
|
|
|
/** |
|
72
|
|
|
* @return list<\Spryker\Shared\Log\Dependency\Plugin\LogProcessorPluginInterface> |
|
73
|
|
|
*/ |
|
74
|
|
|
protected function getGlueSecurityAuditLogProcessorPlugins(): array |
|
75
|
|
|
{ |
|
76
|
|
|
return [ |
|
77
|
|
|
new PsrLogMessageProcessorPlugin(), |
|
78
|
|
|
new EnvironmentProcessorPlugin(), |
|
79
|
|
|
new ServerProcessorPlugin(), |
|
80
|
|
|
new AuditLogRequestProcessorPlugin(), |
|
81
|
|
|
new ResponseProcessorPlugin(), |
|
82
|
|
|
new AuditLogMetaDataProcessorPlugin(), |
|
83
|
|
|
]; |
|
84
|
|
|
} |
|
85
|
|
|
|
|
86
|
|
|
/** |
|
87
|
|
|
* @return list<\Spryker\Shared\Log\Dependency\Plugin\LogProcessorPluginInterface> |
|
88
|
|
|
*/ |
|
89
|
|
|
protected function getGlueBackendSecurityAuditLogProcessorPlugins(): array |
|
90
|
|
|
{ |
|
91
|
|
|
return [ |
|
92
|
|
|
new PsrLogMessageProcessorPlugin(), |
|
93
|
|
|
new EnvironmentProcessorPlugin(), |
|
94
|
|
|
new ServerProcessorPlugin(), |
|
95
|
|
|
new AuditLogRequestProcessorPlugin(), |
|
96
|
|
|
new ResponseProcessorPlugin(), |
|
97
|
|
|
new AuditLogMetaDataProcessorPlugin(), |
|
98
|
|
|
]; |
|
99
|
|
|
} |
|
100
|
|
|
} |
|
101
|
|
|
|