Skip to content

Commit

Permalink
Merge pull request #42560 from nextcloud/fix/42308/logs-more
Browse files Browse the repository at this point in the history
debug logs on huge metadata
  • Loading branch information
ArtificialOwl authored Jan 8, 2024
2 parents d2f2ee2 + e5bee95 commit dd82975
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/private/FilesMetadata/FilesMetadataManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,8 @@ public function saveMetadata(IFilesMetadata $filesMetadata): void {

$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 {
Expand Down

0 comments on commit dd82975

Please sign in to comment.