aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Preview
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2022-03-30 10:55:41 +0200
committerCôme Chilliet <come.chilliet@nextcloud.com>2022-04-26 16:52:52 +0200
commit069477e608566c6ea9edbe259b46c591a82bd8af (patch)
treedf1d338e1d61d1c1b2151e1843dfaff7585818d1 /lib/private/Preview
parent0654b245280a904068079b71c5339561537fdf78 (diff)
downloadnextcloud-server-069477e608566c6ea9edbe259b46c591a82bd8af.tar.gz
nextcloud-server-069477e608566c6ea9edbe259b46c591a82bd8af.zip
Migrate more classes of lib/private to LoggerInterface
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib/private/Preview')
-rw-r--r--lib/private/Preview/Office.php6
-rw-r--r--lib/private/Preview/SVG.php6
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/private/Preview/Office.php b/lib/private/Preview/Office.php
index b16544b3b23..570988aa684 100644
--- a/lib/private/Preview/Office.php
+++ b/lib/private/Preview/Office.php
@@ -31,7 +31,7 @@ namespace OC\Preview;
use OCP\Files\File;
use OCP\Files\FileInfo;
use OCP\IImage;
-use OCP\ILogger;
+use Psr\Log\LoggerInterface;
abstract class Office extends ProviderV2 {
/**
@@ -76,8 +76,8 @@ abstract class Office extends ProviderV2 {
} catch (\Exception $e) {
$this->cleanTmpFiles();
unlink($pngPreview);
- \OC::$server->getLogger()->logException($e, [
- 'level' => ILogger::ERROR,
+ \OC::$server->get(LoggerInterface::class)->error($e->getMessage(), [
+ 'exception' => $e,
'app' => 'core',
]);
return null;
diff --git a/lib/private/Preview/SVG.php b/lib/private/Preview/SVG.php
index 690a6b50ffe..a4ce4899c43 100644
--- a/lib/private/Preview/SVG.php
+++ b/lib/private/Preview/SVG.php
@@ -29,7 +29,7 @@ namespace OC\Preview;
use OCP\Files\File;
use OCP\IImage;
-use OCP\ILogger;
+use Psr\Log\LoggerInterface;
class SVG extends ProviderV2 {
/**
@@ -60,8 +60,8 @@ class SVG extends ProviderV2 {
$svg->readImageBlob($content);
$svg->setImageFormat('png32');
} catch (\Exception $e) {
- \OC::$server->getLogger()->logException($e, [
- 'level' => ILogger::ERROR,
+ \OC::$server->get(LoggerInterface::class)->error($e->getMessage(), [
+ 'exception' => $e,
'app' => 'core',
]);
return null;