1
0
Fork 0
mirror of synced 2025-04-02 21:36:14 +03:00

Drop forgotten writeBaseLogs

This commit is contained in:
Alex Komarichev 2024-09-20 12:33:39 +03:00
parent 390dad0dc4
commit 6e582a40ca

View file

@ -34,7 +34,7 @@ if (!class_exists('WC_Retailcrm_Upload_Discount_Price')):
$error = $this->uploadSettings();
if ($error !== '') {
writeBaseLogs($error);
WC_Retailcrm_Logger::error(__METHOD__, $error);
return;
}
@ -66,7 +66,7 @@ if (!class_exists('WC_Retailcrm_Upload_Discount_Price')):
}
if (empty($products)) {
writeBaseLogs('Can`t get products!');
WC_Retailcrm_Logger::error(__METHOD__, 'Can`t get products!');
return;
}
@ -107,7 +107,17 @@ if (!class_exists('WC_Retailcrm_Upload_Discount_Price')):
unset($chunks);
} catch (\Throwable $exception) {
writeBaseLogs($exception->getMessage() . PHP_EOL . $exception->getTraceAsString());
WC_Retailcrm_Logger::error(
__METHOD__,
sprintf(
'Exception: %s in file %s on line %s',
$exception->getMessage(),
$exception->getFile(),
$exception->getLine()
),
['trace' => $exception->getTraceAsString()],
WC_Retailcrm_Logger::TYPE['exc']
);
return;
}