diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-10-05 11:55:28 +0300 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-10-05 11:57:22 +0300 |
commit | 81c28d4bc29cab74a2773f0263f7050896db8c09 (patch) | |
tree | 0fc4238e94be40592288e712a34a5976fc5fae85 /lib/Migration | |
parent | 46605fd85835ad289be2fe46b73349751f68205b (diff) |
Migrate remaining usage of ILogger to the PSR logger interface
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/Migration')
-rw-r--r-- | lib/Migration/MakeItineraryExtractorExecutable.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Migration/MakeItineraryExtractorExecutable.php b/lib/Migration/MakeItineraryExtractorExecutable.php index 3d085f0b0..a3a2b6b70 100644 --- a/lib/Migration/MakeItineraryExtractorExecutable.php +++ b/lib/Migration/MakeItineraryExtractorExecutable.php @@ -26,9 +26,9 @@ declare(strict_types=1); namespace OCA\Mail\Migration; use Exception; -use OCP\ILogger; use OCP\Migration\IOutput; use OCP\Migration\IRepairStep; +use Psr\Log\LoggerInterface; use Throwable; use function chmod; use function is_executable; @@ -36,13 +36,13 @@ use function is_file; class MakeItineraryExtractorExecutable implements IRepairStep { - /** @var ILogger */ + /** @var LoggerInterface */ private $logger; /** @var string */ private $file; - public function __construct(ILogger $logger, + public function __construct(LoggerInterface $logger, string $file = null) { $this->file = $file ?? __DIR__ . '/../../vendor/christophwurst/kitinerary-bin/bin/kitinerary-extractor'; $this->logger = $logger; @@ -67,8 +67,8 @@ class MakeItineraryExtractorExecutable implements IRepairStep { throw new Exception('chmod returned false'); } } catch (Throwable $e) { - $this->logger->logException($e, [ - 'message' => 'Can\'t make itinerary extractor executable', + $this->logger->error('Can\'t make itinerary extractor executable: ' . $e, [ + 'exception' => $e, ]); $output->warning('Can\'t make itinerary extractor executable: ' . $e->getMessage()); return; |