Merge pull request #9094 from nextcloud/13-9092

[stable13] Add more logging for the object storage during creation of the buckets
This commit is contained in:
Roeland Jago Douma 2018-04-05 21:45:20 +02:00 committed by GitHub
commit 4e732b866d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -104,13 +104,14 @@ trait S3ConnectionTrait {
if (!$this->connection->doesBucketExist($this->bucket)) {
try {
\OC::$server->getLogger()->info('Bucket "' . $this->bucket . '" does not exist - creating it.', ['app' => 'objectstore']);
$this->connection->createBucket(array(
'Bucket' => $this->bucket
));
$this->testTimeout();
} catch (S3Exception $e) {
\OCP\Util::logException('files_external', $e);
throw new \Exception('Creation of bucket failed. ' . $e->getMessage());
\OCP\Util::logException('objectstore', $e);
throw new \Exception('Creation of bucket "' . $this->bucket . '" failed. ' . $e->getMessage());
}
}