@@ -31,124 +31,124 @@ |
||
31 | 31 | |
32 | 32 | class ScopedPsrLogger implements LoggerInterface { |
33 | 33 | |
34 | - /** @var LoggerInterface */ |
|
35 | - private $inner; |
|
36 | - |
|
37 | - /** @var string */ |
|
38 | - private $appId; |
|
39 | - |
|
40 | - public function __construct(LoggerInterface $inner, |
|
41 | - string $appId) { |
|
42 | - $this->inner = $inner; |
|
43 | - $this->appId = $appId; |
|
44 | - } |
|
45 | - |
|
46 | - public function emergency($message, array $context = []) { |
|
47 | - $this->inner->emergency( |
|
48 | - $message, |
|
49 | - array_merge( |
|
50 | - [ |
|
51 | - 'app' => $this->appId, |
|
52 | - ], |
|
53 | - $context |
|
54 | - ) |
|
55 | - ); |
|
56 | - } |
|
57 | - |
|
58 | - public function alert($message, array $context = []) { |
|
59 | - $this->inner->alert( |
|
60 | - $message, |
|
61 | - array_merge( |
|
62 | - [ |
|
63 | - 'app' => $this->appId, |
|
64 | - ], |
|
65 | - $context |
|
66 | - ) |
|
67 | - ); |
|
68 | - } |
|
69 | - |
|
70 | - public function critical($message, array $context = []) { |
|
71 | - $this->inner->critical( |
|
72 | - $message, |
|
73 | - array_merge( |
|
74 | - [ |
|
75 | - 'app' => $this->appId, |
|
76 | - ], |
|
77 | - $context |
|
78 | - ) |
|
79 | - ); |
|
80 | - } |
|
81 | - |
|
82 | - public function error($message, array $context = []) { |
|
83 | - $this->inner->error( |
|
84 | - $message, |
|
85 | - array_merge( |
|
86 | - [ |
|
87 | - 'app' => $this->appId, |
|
88 | - ], |
|
89 | - $context |
|
90 | - ) |
|
91 | - ); |
|
92 | - } |
|
93 | - |
|
94 | - public function warning($message, array $context = []) { |
|
95 | - $this->inner->warning( |
|
96 | - $message, |
|
97 | - array_merge( |
|
98 | - [ |
|
99 | - 'app' => $this->appId, |
|
100 | - ], |
|
101 | - $context |
|
102 | - ) |
|
103 | - ); |
|
104 | - } |
|
105 | - |
|
106 | - public function notice($message, array $context = []) { |
|
107 | - $this->inner->notice( |
|
108 | - $message, |
|
109 | - array_merge( |
|
110 | - [ |
|
111 | - 'app' => $this->appId, |
|
112 | - ], |
|
113 | - $context |
|
114 | - ) |
|
115 | - ); |
|
116 | - } |
|
117 | - |
|
118 | - public function info($message, array $context = []) { |
|
119 | - $this->inner->info( |
|
120 | - $message, |
|
121 | - array_merge( |
|
122 | - [ |
|
123 | - 'app' => $this->appId, |
|
124 | - ], |
|
125 | - $context |
|
126 | - ) |
|
127 | - ); |
|
128 | - } |
|
129 | - |
|
130 | - public function debug($message, array $context = []) { |
|
131 | - $this->inner->debug( |
|
132 | - $message, |
|
133 | - array_merge( |
|
134 | - [ |
|
135 | - 'app' => $this->appId, |
|
136 | - ], |
|
137 | - $context |
|
138 | - ) |
|
139 | - ); |
|
140 | - } |
|
141 | - |
|
142 | - public function log($level, $message, array $context = []) { |
|
143 | - $this->inner->log( |
|
144 | - $level, |
|
145 | - $message, |
|
146 | - array_merge( |
|
147 | - [ |
|
148 | - 'app' => $this->appId, |
|
149 | - ], |
|
150 | - $context |
|
151 | - ) |
|
152 | - ); |
|
153 | - } |
|
34 | + /** @var LoggerInterface */ |
|
35 | + private $inner; |
|
36 | + |
|
37 | + /** @var string */ |
|
38 | + private $appId; |
|
39 | + |
|
40 | + public function __construct(LoggerInterface $inner, |
|
41 | + string $appId) { |
|
42 | + $this->inner = $inner; |
|
43 | + $this->appId = $appId; |
|
44 | + } |
|
45 | + |
|
46 | + public function emergency($message, array $context = []) { |
|
47 | + $this->inner->emergency( |
|
48 | + $message, |
|
49 | + array_merge( |
|
50 | + [ |
|
51 | + 'app' => $this->appId, |
|
52 | + ], |
|
53 | + $context |
|
54 | + ) |
|
55 | + ); |
|
56 | + } |
|
57 | + |
|
58 | + public function alert($message, array $context = []) { |
|
59 | + $this->inner->alert( |
|
60 | + $message, |
|
61 | + array_merge( |
|
62 | + [ |
|
63 | + 'app' => $this->appId, |
|
64 | + ], |
|
65 | + $context |
|
66 | + ) |
|
67 | + ); |
|
68 | + } |
|
69 | + |
|
70 | + public function critical($message, array $context = []) { |
|
71 | + $this->inner->critical( |
|
72 | + $message, |
|
73 | + array_merge( |
|
74 | + [ |
|
75 | + 'app' => $this->appId, |
|
76 | + ], |
|
77 | + $context |
|
78 | + ) |
|
79 | + ); |
|
80 | + } |
|
81 | + |
|
82 | + public function error($message, array $context = []) { |
|
83 | + $this->inner->error( |
|
84 | + $message, |
|
85 | + array_merge( |
|
86 | + [ |
|
87 | + 'app' => $this->appId, |
|
88 | + ], |
|
89 | + $context |
|
90 | + ) |
|
91 | + ); |
|
92 | + } |
|
93 | + |
|
94 | + public function warning($message, array $context = []) { |
|
95 | + $this->inner->warning( |
|
96 | + $message, |
|
97 | + array_merge( |
|
98 | + [ |
|
99 | + 'app' => $this->appId, |
|
100 | + ], |
|
101 | + $context |
|
102 | + ) |
|
103 | + ); |
|
104 | + } |
|
105 | + |
|
106 | + public function notice($message, array $context = []) { |
|
107 | + $this->inner->notice( |
|
108 | + $message, |
|
109 | + array_merge( |
|
110 | + [ |
|
111 | + 'app' => $this->appId, |
|
112 | + ], |
|
113 | + $context |
|
114 | + ) |
|
115 | + ); |
|
116 | + } |
|
117 | + |
|
118 | + public function info($message, array $context = []) { |
|
119 | + $this->inner->info( |
|
120 | + $message, |
|
121 | + array_merge( |
|
122 | + [ |
|
123 | + 'app' => $this->appId, |
|
124 | + ], |
|
125 | + $context |
|
126 | + ) |
|
127 | + ); |
|
128 | + } |
|
129 | + |
|
130 | + public function debug($message, array $context = []) { |
|
131 | + $this->inner->debug( |
|
132 | + $message, |
|
133 | + array_merge( |
|
134 | + [ |
|
135 | + 'app' => $this->appId, |
|
136 | + ], |
|
137 | + $context |
|
138 | + ) |
|
139 | + ); |
|
140 | + } |
|
141 | + |
|
142 | + public function log($level, $message, array $context = []) { |
|
143 | + $this->inner->log( |
|
144 | + $level, |
|
145 | + $message, |
|
146 | + array_merge( |
|
147 | + [ |
|
148 | + 'app' => $this->appId, |
|
149 | + ], |
|
150 | + $context |
|
151 | + ) |
|
152 | + ); |
|
153 | + } |
|
154 | 154 | } |