aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Console
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2021-04-16 14:26:43 +0200
committerJoas Schilling <coding@schilljs.com>2021-04-27 14:34:32 +0200
commit56ae87c281d2f54b23f98acf0e138d8e72196a06 (patch)
treed875702c4eb0901bcf6d3e23570a05ba5c397954 /lib/private/Console
parentbf1c875425e7fdf5ffd3c233ddf1f567428b4168 (diff)
downloadnextcloud-server-56ae87c281d2f54b23f98acf0e138d8e72196a06.tar.gz
nextcloud-server-56ae87c281d2f54b23f98acf0e138d8e72196a06.zip
Less ILogger
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/Console')
-rw-r--r--lib/private/Console/Application.php17
1 files changed, 6 insertions, 11 deletions
diff --git a/lib/private/Console/Application.php b/lib/private/Console/Application.php
index 9b1cc57aed3..06edf62147e 100644
--- a/lib/private/Console/Application.php
+++ b/lib/private/Console/Application.php
@@ -37,8 +37,8 @@ use OC_App;
use OCP\AppFramework\QueryException;
use OCP\Console\ConsoleEvent;
use OCP\IConfig;
-use OCP\ILogger;
use OCP\IRequest;
+use Psr\Log\LoggerInterface;
use Symfony\Component\Console\Application as SymfonyApplication;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
@@ -53,22 +53,15 @@ class Application {
private $dispatcher;
/** @var IRequest */
private $request;
- /** @var ILogger */
+ /** @var LoggerInterface */
private $logger;
/** @var MemoryInfo */
private $memoryInfo;
- /**
- * @param IConfig $config
- * @param EventDispatcherInterface $dispatcher
- * @param IRequest $request
- * @param ILogger $logger
- * @param MemoryInfo $memoryInfo
- */
public function __construct(IConfig $config,
EventDispatcherInterface $dispatcher,
IRequest $request,
- ILogger $logger,
+ LoggerInterface $logger,
MemoryInfo $memoryInfo) {
$defaults = \OC::$server->getThemingDefaults();
$this->config = $config;
@@ -142,7 +135,9 @@ class Application {
try {
require $file;
} catch (\Exception $e) {
- $this->logger->logException($e);
+ $this->logger->error($e->getMessage(), [
+ 'exception' => $e,
+ ]);
}
}
}