aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/files/lib/Command/Scan.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/files/lib/Command/Scan.php b/apps/files/lib/Command/Scan.php
index 7f45a9ea518..146d7a3d2c8 100644
--- a/apps/files/lib/Command/Scan.php
+++ b/apps/files/lib/Command/Scan.php
@@ -166,6 +166,10 @@ class Scan extends Base {
} catch (NotFoundException $e) {
$output->writeln('<error>Path not found: ' . $e->getMessage() . '</error>');
++$this->errorsCounter;
+ $this->logger->error(
+ 'Path not found: ' . $e->getMessage(),
+ [ 'exception' => $e ],
+ );
} catch (LockedException $e) {
if (str_starts_with($e->getPath(), 'scanner::')) {
$output->writeln('<error>Another process is already scanning \'' . substr($e->getPath(), strlen('scanner::')) . '\'</error>');
@@ -176,6 +180,10 @@ class Scan extends Base {
$output->writeln('<error>Exception during scan: ' . $e->getMessage() . '</error>');
$output->writeln('<error>' . $e->getTraceAsString() . '</error>');
++$this->errorsCounter;
+ $this->logger->error(
+ 'Exception during scan: ' . $e->getMessage(),
+ [ 'exception' => $e ],
+ );
}
}