Merge pull request #42560 from nextcloud/fix/42308/logs-more

debug logs on huge metadata
pull/42633/head
Maxence Lange 2024-01-08 11:45:54 +07:00 committed by GitHub
commit dd8297553c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

@ -176,7 +176,8 @@ class FilesMetadataManager implements IFilesMetadataManager {
$json = json_encode($filesMetadata->jsonSerialize());
if (strlen($json) > self::JSON_MAXSIZE) {
throw new FilesMetadataException('json cannot exceed ' . self::JSON_MAXSIZE . ' characters long');
$this->logger->debug('huge metadata content detected: ' . $json);
throw new FilesMetadataException('json cannot exceed ' . self::JSON_MAXSIZE . ' characters long; fileId: ' . $filesMetadata->getFileId() . '; size: ' . strlen($json));
}
try {