Add more logging for the object storage during creation of the buckets

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
Morris Jobke 2018-04-05 17:26:09 +02:00
parent 1c891a5c90
commit bb656750f5
No known key found for this signature in database
GPG Key ID: FE03C3A163FEDE68
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());
}
}