Skip to content

Commit 625e62a

Browse files
committed
MAGE-681 Fixing the error log
1 parent e9fb68b commit 625e62a

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Helper/Entity/ProductHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ public function setSettings($indexName, $indexNameTmp, $storeId, $saveToTmpIndic
518518
Copying synonyms from production index to TMP one to not erase them with the index move.
519519
');
520520
} catch (AlgoliaException $e) {
521-
$this->logger->log('Error encountered while copying synonyms: ' . $e->getMessage());
521+
$this->logger->error('Error encountered while copying synonyms: ' . $e->getMessage());
522522
}
523523

524524
try {

Helper/Logger.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,15 @@ public function log($message)
7474
}
7575
}
7676

77+
public function error($message) {
78+
if ($this->enabled) {
79+
$this->logger->error($message);
80+
}
81+
}
82+
7783
private function formatTime($begin, $end)
7884
{
7985
return ($end - $begin) . 'sec';
8086
}
87+
8188
}

0 commit comments

Comments
 (0)