File tree 2 files changed +8
-8
lines changed
2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -27,11 +27,6 @@ class Handler extends Base
27
27
*/
28
28
protected $ fileName = '/var/log/multisafepay.log ' ;
29
29
30
- /**
31
- * @var int
32
- */
33
- protected $ level = Logger::INFO ;
34
-
35
30
/**
36
31
* @var Config
37
32
*/
@@ -57,15 +52,19 @@ public function __construct(
57
52
}
58
53
59
54
/**
60
- * @param array $record
55
+ * @param $record
61
56
* @return bool
62
57
*/
63
- public function isHandling (array $ record ): bool
58
+ public function isHandling ($ record ): bool
64
59
{
65
60
if ($ this ->config ->isDebug ()) {
66
61
return true ;
67
62
}
68
63
69
- return $ record ['level ' ] >= Logger::WARNING ;
64
+ if ($ record instanceof \Monolog \LogRecord) {
65
+ return $ record ->toArray ()['level ' ] >= \Monolog \Level::Warning;
66
+ }
67
+
68
+ return $ record ['level ' ] >= \Monolog \Logger::WARNING ;
70
69
}
71
70
}
Original file line number Diff line number Diff line change @@ -10,3 +10,4 @@ parameters:
10
10
- Model/Api/Builder/OrderRequestBuilder/ShoppingCartBuilder/CustomTotalBuilder.php
11
11
- Util/ThirdPartyPluginsUtil.php
12
12
- Factory/SdkFactory.php
13
+ - Logger/Handler.php
You can’t perform that action at this time.
0 commit comments