Skip to content

Commit

Permalink
Wrap max log level retrieval from config in a try catch (#2203)
Browse files Browse the repository at this point in the history
  • Loading branch information
elidrissidev authored Jun 8, 2022
1 parent dc115a8 commit 417a20d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/Mage.php
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,11 @@ public static function log($message, $level = null, $file = '', $forceLog = fals

static $loggers = array();

$maxLogLevel = (int) self::getStoreConfig('dev/log/max_level');
try {
$maxLogLevel = (int) self::getStoreConfig('dev/log/max_level');
} catch (Throwable $e) {
$maxLogLevel = Zend_Log::DEBUG;
}

$level = is_null($level) ? Zend_Log::DEBUG : $level;

Expand Down

0 comments on commit 417a20d

Please sign in to comment.