mirror of
https://github.com/nextcloud/server.git
synced 2026-04-03 16:16:36 -04:00
refactor(ObjectStoreStorage): streamline writeStream logging logic
Signed-off-by: Josh <josh.t.richards@gmail.com>
This commit is contained in:
parent
343781e7e9
commit
25728abe2d
1 changed files with 10 additions and 15 deletions
|
|
@ -547,22 +547,17 @@ class ObjectStoreStorage extends Common implements IChunkedFileWrite {
|
|||
*/
|
||||
if (!$exists) {
|
||||
$this->getCache()->remove($uploadPath);
|
||||
$this->logger->error(
|
||||
'Could not create object ' . $urn . ' for ' . $path,
|
||||
[
|
||||
'app' => 'objectstore',
|
||||
'exception' => $ex,
|
||||
]
|
||||
);
|
||||
} else {
|
||||
$this->logger->error(
|
||||
'Could not update object ' . $urn . ' for ' . $path,
|
||||
[
|
||||
'app' => 'objectstore',
|
||||
'exception' => $ex,
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
$operation = $exists ? 'update' : 'create';
|
||||
$this->logger->error(
|
||||
sprintf('Could not %s object %s for %s', $operation, $urn, $path),,
|
||||
[
|
||||
'app' => 'objectstore',
|
||||
'exception' => $ex,
|
||||
]
|
||||
);
|
||||
|
||||
throw new GenericFileException('Error while writing stream to object store', 0, $ex);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue