Skip to content

Commit b1dd925

Browse files
committed
add backwards compatibility
1 parent c1d0f93 commit b1dd925

File tree

1 file changed

+28
-9
lines changed

1 file changed

+28
-9
lines changed

Model/Logger/Handler/Debug.php

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,36 @@
99

1010
use Monolog\LogRecord;
1111

12-
/**
13-
* Debug handler which doesn't require debug mode enabled
14-
*/
15-
class Debug extends \Magento\Framework\Logger\Handler\Debug
16-
{
12+
if (\Monolog\Logger::API == 3) {
13+
/**
14+
* Debug handler which doesn't require debug mode enabled
15+
*/
16+
class Debug extends \Magento\Framework\Logger\Handler\Debug
17+
{
18+
/**
19+
* @param LogRecord $record
20+
* @return mixed
21+
*/
22+
public function isHandling(LogRecord $record): bool
23+
{
24+
return parent::isHandling($record);
25+
}
26+
}
27+
28+
}
29+
else {
1730
/**
18-
* @param array $record
19-
* @return mixed
31+
* Debug handler which doesn't require debug mode enabled
2032
*/
21-
public function isHandling(LogRecord $record): bool
33+
class Debug extends \Magento\Framework\Logger\Handler\Debug
2234
{
23-
return parent::isHandling($record);
35+
/**
36+
* @param array $record
37+
* @return mixed
38+
*/
39+
public function isHandling(array $record): bool
40+
{
41+
return parent::isHandling($record);
42+
}
2443
}
2544
}

0 commit comments

Comments
 (0)