1 | <?php |
||
8 | class LogsAggregator implements LoggerInterface |
||
9 | { |
||
10 | public const DEBUG = 100; |
||
11 | public const INFO = 200; |
||
12 | public const NOTICE = 250; |
||
13 | public const WARNING = 300; |
||
14 | public const ERROR = 400; |
||
15 | public const CRITICAL = 500; |
||
16 | public const ALERT = 550; |
||
17 | public const EMERGENCY = 600; |
||
18 | |||
19 | /** @var array */ |
||
20 | protected $records = []; |
||
21 | |||
22 | 1 | public function addRecord(int $level, string $message, array $context = []): void |
|
30 | |||
31 | /** |
||
32 | * @return array |
||
33 | */ |
||
34 | 1 | public function getRecords(): array |
|
38 | |||
39 | 1 | public function reset(): void |
|
43 | |||
44 | /** |
||
45 | * {@inheritdoc} |
||
46 | */ |
||
47 | 1 | public function emergency($message, array $context = []): void |
|
51 | |||
52 | /** |
||
53 | * {@inheritdoc} |
||
54 | */ |
||
55 | 1 | public function alert($message, array $context = []): void |
|
59 | |||
60 | /** |
||
61 | * {@inheritdoc} |
||
62 | */ |
||
63 | 1 | public function critical($message, array $context = []): void |
|
67 | |||
68 | /** |
||
69 | * {@inheritdoc} |
||
70 | */ |
||
71 | 1 | public function error($message, array $context = []): void |
|
75 | |||
76 | /** |
||
77 | * {@inheritdoc} |
||
78 | */ |
||
79 | 1 | public function warning($message, array $context = []): void |
|
83 | |||
84 | /** |
||
85 | * {@inheritdoc} |
||
86 | */ |
||
87 | 1 | public function notice($message, array $context = []): void |
|
91 | |||
92 | /** |
||
93 | * {@inheritdoc} |
||
94 | */ |
||
95 | 1 | public function info($message, array $context = []): void |
|
99 | |||
100 | /** |
||
101 | * {@inheritdoc} |
||
102 | */ |
||
103 | 1 | public function debug($message, array $context = []): void |
|
107 | |||
108 | /** |
||
109 | * {@inheritdoc} |
||
110 | */ |
||
111 | 1 | public function log($level, $message, array $context = []): void |
|
115 | } |
||
116 |