Skip to content

Commit 66873e3

Browse files
Ethan3600torhoehn
authored andcommitted
Log when maintenance mode is enabled
Let's not play guessing games why we're getting a 500 errors...
1 parent c6e9ca2 commit 66873e3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/internal/Magento/Framework/App/Bootstrap.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,13 @@ class Bootstrap
107107
*/
108108
private $factory;
109109

110+
/**
111+
* Logger
112+
*
113+
* @var LoggerInterface
114+
*/
115+
private $logger;
116+
110117
/**
111118
* Static method so that client code does not have to create Object Manager Factory every time Bootstrap is called
112119
*
@@ -207,6 +214,7 @@ public function __construct(ObjectManagerFactory $factory, $rootDir, array $init
207214
$this->rootDir = $rootDir;
208215
$this->server = $initParams;
209216
$this->objectManager = $this->factory->create($this->server);
217+
$this->logger = $this->objectManager->create(LoggerInterface::class);
210218
}
211219

212220
/**
@@ -259,6 +267,7 @@ public function run(AppInterface $application)
259267
\Magento\Framework\Profiler::stop('magento');
260268
} catch (\Exception $e) {
261269
\Magento\Framework\Profiler::stop('magento');
270+
$this->logger->error($e->getMessage());
262271
if (!$application->catchException($this, $e)) {
263272
throw $e;
264273
}

0 commit comments

Comments
 (0)