Skip to content

Commit

Permalink
ENGCOM-2371: Log when Magento is in maintenance mode #16840
Browse files Browse the repository at this point in the history
  • Loading branch information
Stanislav Idolov authored Jul 23, 2018
2 parents 1cbb5bc + d6a9205 commit 081e7ad
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/internal/Magento/Framework/App/Bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use Magento\Framework\Autoload\Populator;
use Magento\Framework\Config\File\ConfigFilePool;
use Magento\Framework\Filesystem\DriverPool;
use Psr\Log\LoggerInterface;

/**
* A bootstrap of Magento application
Expand Down Expand Up @@ -258,6 +259,7 @@ public function run(AppInterface $application)
\Magento\Framework\Profiler::stop('magento');
} catch (\Exception $e) {
\Magento\Framework\Profiler::stop('magento');
$this->objectManager->get(LoggerInterface::class)->error($e->getMessage());
if (!$application->catchException($this, $e)) {
throw $e;
}
Expand Down Expand Up @@ -423,7 +425,7 @@ protected function terminate(\Exception $e)
if (!$this->objectManager) {
throw new \DomainException();
}
$this->objectManager->get(\Psr\Log\LoggerInterface::class)->critical($e);
$this->objectManager->get(LoggerInterface::class)->critical($e);
} catch (\Exception $e) {
$message .= "Could not write error message to log. Please use developer mode to see the message.\n";
}
Expand Down

0 comments on commit 081e7ad

Please sign in to comment.