diff options
-rw-r--r-- | lib/private/Preview/MP3.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/private/Preview/MP3.php b/lib/private/Preview/MP3.php index 4c5f932f477..1cb61b1352b 100644 --- a/lib/private/Preview/MP3.php +++ b/lib/private/Preview/MP3.php @@ -30,8 +30,8 @@ namespace OC\Preview; use OCP\Files\File; use OCP\IImage; -use Psr\Log\LoggerInterface; use wapmorgan\Mp3Info\Mp3Info; +use function OCP\Log\logger; class MP3 extends ProviderV2 { /** @@ -52,9 +52,9 @@ class MP3 extends ProviderV2 { /** @var string|null|false $picture */ $picture = $audio->getCover(); } catch (\Throwable $e) { - \OC::$server->get(LoggerInterface::class)->info($e->getMessage(), [ - 'exception' => $e, - 'app' => 'core', + logger('core')->info('Error while getting cover from mp3 file: ' . $e->getMessage(), [ + 'fileId' => $file->getId(), + 'filePath' => $file->getPath(), ]); return null; } finally { |