Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2022-03-17 19:26:27 +0300
committerCôme Chilliet <come.chilliet@nextcloud.com>2022-03-24 18:21:25 +0300
commitea23523c70ee562092510ccf88e7aa469aae9ce6 (patch)
treeda0ce15036d2f7b82ef1a0e44adb497c8e951cb3 /lib/private/Files
parenteb961e47003ee5b6d7328caf10ecd5f53cc93666 (diff)
Adapt more code to migration to LoggerInterface
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib/private/Files')
-rw-r--r--lib/private/Files/Cache/Cache.php5
-rw-r--r--lib/private/Files/ObjectStore/Swift.php3
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/private/Files/Cache/Cache.php b/lib/private/Files/Cache/Cache.php
index 7c2e635549a..949079dfa22 100644
--- a/lib/private/Files/Cache/Cache.php
+++ b/lib/private/Files/Cache/Cache.php
@@ -58,6 +58,7 @@ use OCP\Files\Search\ISearchOperator;
use OCP\Files\Search\ISearchQuery;
use OCP\Files\Storage\IStorage;
use OCP\IDBConnection;
+use Psr\Log\LoggerInterface;
/**
* Metadata cache for a storage
@@ -128,7 +129,7 @@ class Cache implements ICache {
return new CacheQueryBuilder(
$this->connection,
\OC::$server->getSystemConfig(),
- \OC::$server->getLogger()
+ \OC::$server->get(LoggerInterface::class)
);
}
@@ -590,7 +591,7 @@ class Cache implements ICache {
$query = $this->getQueryBuilder();
$query->delete('filecache_extended')
->where($query->expr()->in('fileid', $query->createParameter('childIds')));
-
+
foreach (array_chunk($childIds, 1000) as $childIdChunk) {
$query->setParameter('childIds', $childIdChunk, IQueryBuilder::PARAM_INT_ARRAY);
$query->execute();
diff --git a/lib/private/Files/ObjectStore/Swift.php b/lib/private/Files/ObjectStore/Swift.php
index a3c8d92f3d2..b463cb9d44d 100644
--- a/lib/private/Files/ObjectStore/Swift.php
+++ b/lib/private/Files/ObjectStore/Swift.php
@@ -32,6 +32,7 @@ use Icewind\Streams\RetryWrapper;
use OCP\Files\NotFoundException;
use OCP\Files\ObjectStore\IObjectStore;
use OCP\Files\StorageAuthException;
+use Psr\Log\LoggerInterface;
const SWIFT_SEGMENT_SIZE = 1073741824; // 1GB
@@ -48,7 +49,7 @@ class Swift implements IObjectStore {
$this->swiftFactory = $connectionFactory ?: new SwiftFactory(
\OC::$server->getMemCacheFactory()->createDistributed('swift::'),
$params,
- \OC::$server->getLogger()
+ \OC::$server->get(LoggerInterface::class)
);
$this->params = $params;
}