diff options
author | Morris Jobke <hey@morrisjobke.de> | 2021-03-25 17:08:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-25 17:08:13 +0100 |
commit | c25daf5df7885f274eb49b82566be373c4d54b9b (patch) | |
tree | 47a0add769148aab3e42932e1fda29f250a039b1 /lib/private/Files/Cache/Storage.php | |
parent | 570c25c861414674d47c09e1484832948d7bd49f (diff) | |
parent | 81fef4ddee9e0710230f821066977258734c3ce7 (diff) | |
download | nextcloud-server-c25daf5df7885f274eb49b82566be373c4d54b9b.tar.gz nextcloud-server-c25daf5df7885f274eb49b82566be373c4d54b9b.zip |
Merge pull request #26299 from nextcloud/enh/noid/log-storage-unavailable
Log when a storage is marked as unavailable
Diffstat (limited to 'lib/private/Files/Cache/Storage.php')
-rw-r--r-- | lib/private/Files/Cache/Storage.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/Files/Cache/Storage.php b/lib/private/Files/Cache/Storage.php index af37bef8415..173091f53b0 100644 --- a/lib/private/Files/Cache/Storage.php +++ b/lib/private/Files/Cache/Storage.php @@ -30,6 +30,7 @@ namespace OC\Files\Cache; use OCP\Files\Storage\IStorage; +use Psr\Log\LoggerInterface; /** * Handle the mapping between the string and numeric storage ids @@ -175,6 +176,9 @@ class Storage { */ public function setAvailability($isAvailable, int $delay = 0) { $available = $isAvailable ? 1 : 0; + if (!$isAvailable) { + \OC::$server->get(LoggerInterface::class)->info('Storage with ' . $this->storageId . ' marked as unavailable', ['app' => 'lib']); + } $query = \OC::$server->getDatabaseConnection()->getQueryBuilder(); $query->update('storages') |