summaryrefslogtreecommitdiffstats
path: root/apps/files_external
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2018-04-25 15:22:28 +0200
committerMorris Jobke <hey@morrisjobke.de>2018-04-26 10:45:52 +0200
commit38a90130ce425d531a804dff591df4a883de3154 (patch)
treed579e7442832672ab2987f9c9ecf62e79ca09a8d /apps/files_external
parent12c5db90322f61d4d48e1bb534bb94382d17e317 (diff)
downloadnextcloud-server-38a90130ce425d531a804dff591df4a883de3154.tar.gz
nextcloud-server-38a90130ce425d531a804dff591df4a883de3154.zip
move log constants to ILogger
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/files_external')
-rw-r--r--apps/files_external/lib/Lib/Storage/SMB.php3
-rw-r--r--apps/files_external/lib/Lib/Storage/Swift.php19
-rw-r--r--apps/files_external/lib/Service/LegacyStoragesService.php3
-rw-r--r--apps/files_external/lib/Service/StoragesService.php7
4 files changed, 18 insertions, 14 deletions
diff --git a/apps/files_external/lib/Lib/Storage/SMB.php b/apps/files_external/lib/Lib/Storage/SMB.php
index 12ab6b0fed8..a533298c06d 100644
--- a/apps/files_external/lib/Lib/Storage/SMB.php
+++ b/apps/files_external/lib/Lib/Storage/SMB.php
@@ -52,6 +52,7 @@ use OCP\Files\Notify\IChange;
use OCP\Files\Notify\IRenameChange;
use OCP\Files\Storage\INotifyStorage;
use OCP\Files\StorageNotAvailableException;
+use OCP\ILogger;
use OCP\Util;
class SMB extends Common implements INotifyStorage {
@@ -202,7 +203,7 @@ class SMB extends Common implements INotifyStorage {
$this->remove($target);
$result = $this->share->rename($absoluteSource, $absoluteTarget);
} catch (\Exception $e) {
- \OC::$server->getLogger()->logException($e, ['level' => Util::WARN]);
+ \OC::$server->getLogger()->logException($e, ['level' => ILogger::WARN]);
return false;
}
unset($this->statCache[$absoluteSource], $this->statCache[$absoluteTarget]);
diff --git a/apps/files_external/lib/Lib/Storage/Swift.php b/apps/files_external/lib/Lib/Storage/Swift.php
index 4fcd60a797d..689fd700253 100644
--- a/apps/files_external/lib/Lib/Storage/Swift.php
+++ b/apps/files_external/lib/Lib/Storage/Swift.php
@@ -45,6 +45,7 @@ use Icewind\Streams\CallbackWrapper;
use Icewind\Streams\IteratorDirectory;
use OC\Files\ObjectStore\SwiftFactory;
use OCP\Files\StorageBadConfigException;
+use OCP\ILogger;
use OpenStack\Common\Error\BadResponseError;
use OpenStack\ObjectStore\v1\Models\StorageObject;
@@ -132,7 +133,7 @@ class Swift extends \OC\Files\Storage\Common {
// Expected response is "404 Not Found", so only log if it isn't
if ($e->getResponse()->getStatusCode() !== 404) {
\OC::$server->getLogger()->logException($e, [
- 'level' => \OCP\Util::ERROR,
+ 'level' => ILogger::ERROR,
'app' => 'files_external',
]);
}
@@ -225,7 +226,7 @@ class Swift extends \OC\Files\Storage\Common {
$this->objectCache->remove($path);
} catch (BadResponseError $e) {
\OC::$server->getLogger()->logException($e, [
- 'level' => \OCP\Util::ERROR,
+ 'level' => ILogger::ERROR,
'app' => 'files_external',
]);
return false;
@@ -269,7 +270,7 @@ class Swift extends \OC\Files\Storage\Common {
$this->objectCache->remove($path . '/');
} catch (BadResponseError $e) {
\OC::$server->getLogger()->logException($e, [
- 'level' => \OCP\Util::ERROR,
+ 'level' => ILogger::ERROR,
'app' => 'files_external',
]);
return false;
@@ -307,7 +308,7 @@ class Swift extends \OC\Files\Storage\Common {
return IteratorDirectory::wrap($files);
} catch (\Exception $e) {
\OC::$server->getLogger()->logException($e, [
- 'level' => \OCP\Util::ERROR,
+ 'level' => ILogger::ERROR,
'app' => 'files_external',
]);
return false;
@@ -331,7 +332,7 @@ class Swift extends \OC\Files\Storage\Common {
}
} catch (BadResponseError $e) {
\OC::$server->getLogger()->logException($e, [
- 'level' => \OCP\Util::ERROR,
+ 'level' => ILogger::ERROR,
'app' => 'files_external',
]);
return false;
@@ -385,7 +386,7 @@ class Swift extends \OC\Files\Storage\Common {
} catch (BadResponseError $e) {
if ($e->getResponse()->getStatusCode() !== 404) {
\OC::$server->getLogger()->logException($e, [
- 'level' => \OCP\Util::ERROR,
+ 'level' => ILogger::ERROR,
'app' => 'files_external',
]);
throw $e;
@@ -409,7 +410,7 @@ class Swift extends \OC\Files\Storage\Common {
return $this->objectStore->readObject($path);
} catch (BadResponseError $e) {
\OC::$server->getLogger()->logException($e, [
- 'level' => \OCP\Util::ERROR,
+ 'level' => ILogger::ERROR,
'app' => 'files_external',
]);
return false;
@@ -496,7 +497,7 @@ class Swift extends \OC\Files\Storage\Common {
$this->objectCache->remove($path2 . '/');
} catch (BadResponseError $e) {
\OC::$server->getLogger()->logException($e, [
- 'level' => \OCP\Util::ERROR,
+ 'level' => ILogger::ERROR,
'app' => 'files_external',
]);
return false;
@@ -513,7 +514,7 @@ class Swift extends \OC\Files\Storage\Common {
$this->objectCache->remove($path2 . '/');
} catch (BadResponseError $e) {
\OC::$server->getLogger()->logException($e, [
- 'level' => \OCP\Util::ERROR,
+ 'level' => ILogger::ERROR,
'app' => 'files_external',
]);
return false;
diff --git a/apps/files_external/lib/Service/LegacyStoragesService.php b/apps/files_external/lib/Service/LegacyStoragesService.php
index f1bd0b753ae..2b681757806 100644
--- a/apps/files_external/lib/Service/LegacyStoragesService.php
+++ b/apps/files_external/lib/Service/LegacyStoragesService.php
@@ -25,6 +25,7 @@
namespace OCA\Files_External\Service;
use OCA\Files_External\Lib\StorageConfig;
+use OCP\ILogger;
/**
* Read mount config from legacy mount.json
@@ -190,7 +191,7 @@ abstract class LegacyStoragesService {
// don't die if a storage backend doesn't exist
\OC::$server->getLogger()->logException($e, [
'message' => 'Could not load storage.',
- 'level' => \OCP\Util::ERROR,
+ 'level' => ILogger::ERROR,
'app' => 'files_external',
]);
}
diff --git a/apps/files_external/lib/Service/StoragesService.php b/apps/files_external/lib/Service/StoragesService.php
index 89458b70c0c..79eb03cea21 100644
--- a/apps/files_external/lib/Service/StoragesService.php
+++ b/apps/files_external/lib/Service/StoragesService.php
@@ -37,6 +37,7 @@ use \OCA\Files_External\Lib\Backend\Backend;
use \OCA\Files_External\Lib\Auth\AuthMechanism;
use OCP\Files\Config\IUserMountCache;
use \OCP\Files\StorageNotAvailableException;
+use OCP\ILogger;
/**
* Service class to manage external storages
@@ -104,14 +105,14 @@ abstract class StoragesService {
// don't die if a storage backend doesn't exist
\OC::$server->getLogger()->logException($e, [
'message' => 'Could not load storage.',
- 'level' => \OCP\Util::ERROR,
+ 'level' => ILogger::ERROR,
'app' => 'files_external',
]);
return null;
} catch (\InvalidArgumentException $e) {
\OC::$server->getLogger()->logException($e, [
'message' => 'Could not load storage.',
- 'level' => \OCP\Util::ERROR,
+ 'level' => ILogger::ERROR,
'app' => 'files_external',
]);
return null;
@@ -479,7 +480,7 @@ abstract class StoragesService {
// be instantiated or whenever $user vars where used, in which case
// the storage id could not be computed
\OC::$server->getLogger()->logException($e, [
- 'level' => \OCP\Util::ERROR,
+ 'level' => ILogger::ERROR,
'app' => 'files_external',
]);
}