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
|
|
|
declare(strict_types = 1); |
9
|
|
|
|
10
|
|
|
namespace Pyz\Glue\Log; |
11
|
|
|
|
12
|
|
|
use Spryker\Glue\Log\LogDependencyProvider as SprykerLogDependencyProvider; |
13
|
|
|
use Spryker\Glue\Log\Plugin\Handler\StreamHandlerPlugin; |
14
|
|
|
use Spryker\Glue\Log\Plugin\Log\AuditLogMetaDataProcessorPlugin; |
15
|
|
|
use Spryker\Glue\Log\Plugin\Log\AuditLogRequestProcessorPlugin; |
16
|
|
|
use Spryker\Glue\Log\Plugin\Log\AuditLogTagFilterBufferedStreamHandlerPlugin; |
17
|
|
|
use Spryker\Glue\Log\Plugin\Processor\EnvironmentProcessorPlugin; |
18
|
|
|
use Spryker\Glue\Log\Plugin\Processor\GuzzleBodyProcessorPlugin; |
19
|
|
|
use Spryker\Glue\Log\Plugin\Processor\PsrLogMessageProcessorPlugin; |
20
|
|
|
use Spryker\Glue\Log\Plugin\Processor\RequestProcessorPlugin; |
21
|
|
|
use Spryker\Glue\Log\Plugin\Processor\ResponseProcessorPlugin; |
22
|
|
|
use Spryker\Glue\Log\Plugin\Processor\ServerProcessorPlugin; |
23
|
|
|
|
24
|
|
|
class LogDependencyProvider extends SprykerLogDependencyProvider |
25
|
|
|
{ |
26
|
|
|
/** |
27
|
|
|
* @return array<\Monolog\Handler\HandlerInterface> |
28
|
|
|
*/ |
29
|
|
|
protected function getLogHandlers(): array |
30
|
|
|
{ |
31
|
|
|
return [ |
32
|
|
|
new StreamHandlerPlugin(), |
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
|
|
|
|