Skip to content

Commit 2a95216

Browse files
author
Oleksandr Iegorov
committed
MAGETWO-54937: Investigate and if possible implement more detailed error message logging
1 parent 53fc183 commit 2a95216

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

app/code/Magento/Deploy/Model/Deployer.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ public function deploy(ObjectManagerFactory $omFactory, array $locales)
172172
$fileArea . Theme::THEME_PATH_SEPARATOR . $fileTheme,
173173
$this->findAncestors($area . Theme::THEME_PATH_SEPARATOR . $themePath)
174174
))
175-
) {;
175+
) {
176176
$compiledFile = $this->deployFile($filePath, $area, $themePath, $locale, $module, $fullPath);
177177
if ($compiledFile !== '') {
178178
$this->deployFile($compiledFile, $area, $themePath, $locale, $module, $fullPath);
@@ -303,7 +303,7 @@ protected function emulateApplicationLocale($locale, $area)
303303
* @param string $themePath
304304
* @param string $locale
305305
* @param string $module
306-
* @param string $fullPath
306+
* @param string|null $fullPath
307307
* @return string
308308
* @throws \InvalidArgumentException
309309
* @throws LocalizedException
@@ -351,14 +351,13 @@ private function deployFile($filePath, $area, $themePath, $locale, $module, $ful
351351
}
352352
$this->count++;
353353
} catch (ContentProcessorException $exception) {
354-
$pathInfo = ($fullPath) ? $fullPath : $filePath;
354+
$pathInfo = $fullPath ?: $filePath;
355355
$errorMessage = __('Compilation from source: ') . $pathInfo
356356
. PHP_EOL . $exception->getMessage();
357357
$this->errorCount++;
358-
$this->output->write(PHP_EOL. PHP_EOL . $errorMessage . PHP_EOL, true);
358+
$this->output->write(PHP_EOL . PHP_EOL . $errorMessage . PHP_EOL, true);
359359

360-
$logger = $this->getLogger();
361-
$logger->critical($errorMessage);
360+
$this->getLogger()->critical($errorMessage);
362361
} catch (\Exception $exception) {
363362
$this->output->write('.');
364363
$this->verboseLog($exception->getTraceAsString());
@@ -401,6 +400,8 @@ private function verboseLog($message)
401400
}
402401

403402
/**
403+
* Retrieves LoggerInterface instance
404+
*
404405
* @return LoggerInterface
405406
* @deprecated
406407
*/

0 commit comments

Comments
 (0)