Skip to content

Commit 00d5d96

Browse files
AndyXhelimickenordin
authored andcommitted
fix(previews): lower log level when cached preview isn't found
Since this PR nextcloud#52221 was implemented, the log file has been flooded with warnings stating, "Cached preview not found for file; generating a new preview." This appears to be more of an informational message rather than a warning. This PR will change it from warning to debug Original PR nextcloud#52221 Signed-off-by: AndyXheli <andyxheli@gmail.com>
1 parent a8760cb commit 00d5d96

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/private/Preview/Generator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ public function generatePreviews(File $file, array $specifications, ?string $mim
165165
$maxPreviewImage = $this->helper->getImage($maxPreview);
166166
}
167167

168-
$this->logger->warning('Cached preview not found for file {path}, generating a new preview.', ['path' => $file->getPath()]);
168+
$this->logger->debug('Cached preview not found for file {path}, generating a new preview.', ['path' => $file->getPath()]);
169169
$preview = $this->generatePreview($previewFolder, $maxPreviewImage, $width, $height, $crop, $maxWidth, $maxHeight, $previewVersion, $cacheResult);
170170
// New file, augment our array
171171
$previewFiles[] = $preview;

0 commit comments

Comments
 (0)