]> source.dussan.org Git - nextcloud-server.git/commitdiff
debug logs on huge metadata 42560/head
authorMaxence Lange <maxence@artificial-owl.com>
Wed, 3 Jan 2024 15:16:51 +0000 (14:16 -0100)
committerMaxence Lange <maxence@artificial-owl.com>
Thu, 4 Jan 2024 22:51:56 +0000 (21:51 -0100)
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
lib/private/FilesMetadata/FilesMetadataManager.php

index 013c85af604b6541dcd92f296c29539eb115ef8b..9bfa8ae49d6da518de41b007586cd6af87e30405 100644 (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 {