diff --git a/lib/Controller/OpdsController.php b/lib/Controller/OpdsController.php index aedbf53..efcfee6 100644 --- a/lib/Controller/OpdsController.php +++ b/lib/Controller/OpdsController.php @@ -32,7 +32,6 @@ use OCP\IL10N; use OCP\IRequest; use Psr\Log\LoggerInterface; -use Psr\Log\LogLevel; class OpdsController extends Controller { private const DEFAULT_PREFIX_LENGTH = 1; @@ -73,7 +72,7 @@ private function methodWrapper(callable $func): Response { $lib = $this->calibre->getDatabase($libPath); return call_user_func($func, $libPath, $lib); } catch (Exception $e) { - $this->logger->log(LogLevel::ERROR, 'Exception in '.__FUNCTION__, [ 'exception' => $e ]); + $this->logger->error('Exception in '.__FUNCTION__, [ 'exception' => $e ]); return (new Response())->setStatus(Http::STATUS_INTERNAL_SERVER_ERROR); } } diff --git a/lib/Controller/SettingsController.php b/lib/Controller/SettingsController.php index bd29310..8cf1c81 100644 --- a/lib/Controller/SettingsController.php +++ b/lib/Controller/SettingsController.php @@ -11,7 +11,6 @@ use OCP\IRequest; use OCP\PreConditionNotMetException; use Psr\Log\LoggerInterface; -use Psr\Log\LogLevel; use UnexpectedValueException; class SettingsController extends Controller { @@ -26,7 +25,7 @@ public function settings(string $libraryRoot): array { try { $this->settings->setLibrary($libraryRoot); } catch (PreConditionNotMetException|UnexpectedValueException $e) { - $this->logger->log(LogLevel::ERROR, 'Exception in '.__FUNCTION__, [ 'exception' => $e ]); + $this->logger->error('Exception in '.__FUNCTION__, [ 'exception' => $e ]); } return [ 'libraryRoot' => $this->settings->getLibrary()