File tree 3 files changed +10
-8
lines changed
3 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 9
9
}
10
10
],
11
11
"require" : {
12
- "graylog2/gelf-php" : " ^1.2|^ 2.0" ,
13
- "drupal/monolog" : " ^2.0|^ 3.0"
12
+ "graylog2/gelf-php" : " ^2.0" ,
13
+ "drupal/monolog" : " ^3.0"
14
14
}
15
15
}
Original file line number Diff line number Diff line change @@ -13,6 +13,3 @@ services:
13
13
14
14
monolog.processor.installation_type :
15
15
class : Drupal\fac_logger\Logger\Processor\InstallationType
16
-
17
-
18
- parameters :
Original file line number Diff line number Diff line change 2
2
3
3
namespace Drupal \fac_logger \Logger \Processor ;
4
4
5
+ use Monolog \LogRecord ;
6
+
5
7
/**
6
8
* Class installation_type processor.
7
9
*/
@@ -10,13 +12,16 @@ class InstallationType {
10
12
/**
11
13
* Implements invoke.
12
14
*
13
- * @param array $record
15
+ * @param array|LogRecord $record
14
16
* The record.
15
17
*
16
- * @return array
18
+ * @return array|LogRecord
17
19
* The result.
18
20
*/
19
- public function __invoke (array $ record ) {
21
+ public function __invoke (array |LogRecord $ record ) {
22
+ if (!is_array ($ record )) {
23
+ $ record ->toArray ();
24
+ }
20
25
21
26
// Remove any args from a possible backtrace:
22
27
if (isset ($ record ['context ' ]['backtrace ' ]) && is_array ($ record ['context ' ]['backtrace ' ])) {
You can’t perform that action at this time.
0 commit comments