summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Tapken <roland@bitarbeiter.net>2018-02-09 17:30:27 +0100
committerRoland Tapken <roland@bitarbeiter.net>2018-02-11 16:45:32 +0100
commitdc99442bc16972046522888002ad379c170c138a (patch)
treea7c9b97b5cc0ab47d7506717ce54cf16be5c4f9c
parentee77f37df2f601246001abfb259479ef583314a1 (diff)
downloadnextcloud-server-dc99442bc16972046522888002ad379c170c138a.tar.gz
nextcloud-server-dc99442bc16972046522888002ad379c170c138a.zip
External storage test: log exceptions
If an external storage test fails the exception's message is now written into the logfile (level INFO). Additionally, the stack trace is printed as DEBUG. This helps to resolve the reason for a failing connection. Signed-off-by: Roland Tapken <roland@bitarbeiter.net>
-rw-r--r--lib/private/Files/Storage/Common.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/private/Files/Storage/Common.php b/lib/private/Files/Storage/Common.php
index 56d683ffa25..c9a91a7c56a 100644
--- a/lib/private/Files/Storage/Common.php
+++ b/lib/private/Files/Storage/Common.php
@@ -449,8 +449,11 @@ abstract class Common implements Storage, ILockingStorage {
if ($this->stat('')) {
return true;
}
+ \OC::$server->getLogger()->info("External storage not available: stat() failed");
return false;
} catch (\Exception $e) {
+ \OC::$server->getLogger()->info("External storage not available: " . $e->getMessage());
+ \OC::$server->getLogger()->logException($e, ['level' => \OCP\Util::DEBUG]);
return false;
}
}