debug logs on huge metadata

Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
This commit is contained in:
Maxence Lange 2024-01-03 14:16:51 -01:00
parent 7c3936b6f8
commit e5bee95f05

View file

@ -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 {