]> source.dussan.org Git - nextcloud-server.git/commitdiff
changed to public log api
authorFlorin Peter <github@florin-peter.de>
Mon, 27 May 2013 18:51:52 +0000 (20:51 +0200)
committerFlorin Peter <github@florin-peter.de>
Mon, 27 May 2013 18:51:52 +0000 (20:51 +0200)
apps/files_encryption/lib/crypt.php
apps/files_encryption/lib/helper.php
apps/files_encryption/lib/keymanager.php
apps/files_encryption/lib/proxy.php

index 56d5e082e49f4bdd1fcb54e843cd54fc17b07e60..ddeb3590f6032c1e5822f46291f8e5e8cc247171 100755 (executable)
@@ -206,7 +206,7 @@ class Crypt {
 \r
                } else {\r
 \r
-                       \OC_Log::write('Encryption library', 'Encryption (symmetric) of content failed', \OC_Log::ERROR);\r
+                       \OCP\Util::writeLog('Encryption library', 'Encryption (symmetric) of content failed', \OCP\Util::ERROR);\r
 \r
                        return false;\r
 \r
@@ -305,7 +305,7 @@ class Crypt {
 \r
                } else {\r
 \r
-                       \OC_Log::write('Encryption library', 'Encryption (symmetric) of keyfile content failed', \OC_Log::ERROR);\r
+                       \OCP\Util::writeLog('Encryption library', 'Encryption (symmetric) of keyfile content failed', \OCP\Util::ERROR);\r
 \r
                        return false;\r
 \r
@@ -452,7 +452,7 @@ class Crypt {
 \r
                } else {\r
 \r
-                       \OC_Log::write('Encryption library', 'Decryption (asymmetric) of sealed content failed', \OC_Log::ERROR);\r
+                       \OCP\Util::writeLog('Encryption library', 'Decryption (asymmetric) of sealed content failed', \OCP\Util::ERROR);\r
 \r
                        return false;\r
 \r
@@ -503,7 +503,7 @@ class Crypt {
                        if (!$strong) {\r
 \r
                                // If OpenSSL indicates randomness is insecure, log error\r
-                               \OC_Log::write('Encryption library', 'Insecure symmetric key was generated using openssl_random_pseudo_bytes()', \OC_Log::WARN);\r
+                               \OCP\Util::writeLog('Encryption library', 'Insecure symmetric key was generated using openssl_random_pseudo_bytes()', \OCP\Util::WARN);\r
 \r
                        }\r
 \r
index 5fa4583263bab454a4ba679224174ff461d7a290..05172f5a386eebee5d2e648ad1cd3825098776bb 100755 (executable)
@@ -72,8 +72,8 @@ class Helper {
                // Check files_encryption infrastructure is ready for action
                if (!$util->ready()) {
 
-                       \OC_Log::write('Encryption library', 'User account "' . $util->getUserId()
-                                                                                                . '" is not ready for encryption; configuration started', \OC_Log::DEBUG);
+                       \OCP\Util::writeLog('Encryption library', 'User account "' . $util->getUserId()
+                                                                                                . '" is not ready for encryption; configuration started', \OCP\Util::DEBUG);
 
                        if (!$util->setupServerSide($password)) {
                                return false;
index c7b431c3523a31989020df9d0dafdcac46a3b531..9bb854325de0c28cc429e011439d6e0a8fd25503 100755 (executable)
@@ -285,8 +285,8 @@ class Keymanager {
 
                if (!$result) {
 
-                       \OC_Log::write('Encryption library',
-                               'Could not delete keyfile; does not exist: "' . $keyPath, \OC_Log::ERROR);
+                       \OCP\Util::writeLog('Encryption library',
+                               'Could not delete keyfile; does not exist: "' . $keyPath, \OCP\Util::ERROR);
 
                }
 
@@ -475,8 +475,8 @@ class Keymanager {
                        foreach ($matches as $ma) {
                                $result = unlink($ma);
                                if (!$result) {
-                                       \OC_Log::write('Encryption library',
-                                               'Keyfile or shareKey could not be deleted for file "' . $filePath . '"', \OC_Log::ERROR);
+                                       \OCP\Util::writeLog('Encryption library',
+                                               'Keyfile or shareKey could not be deleted for file "' . $filePath . '"', \OCP\Util::ERROR);
                                }
                        }
                }
@@ -507,9 +507,9 @@ class Keymanager {
                        foreach ($userIds as $userId) {
 
                                if (!$view->unlink($shareKeyPath . '.' . $userId . '.shareKey')) {
-                                       \OC_Log::write('Encryption library',
+                                       \OCP\Util::writeLog('Encryption library',
                                                'Could not delete shareKey; does not exist: "' . $shareKeyPath . '.' . $userId
-                                               . '.shareKey"', \OC_Log::ERROR);
+                                               . '.shareKey"', \OCP\Util::ERROR);
                                }
 
                        }
@@ -531,8 +531,8 @@ class Keymanager {
                /** @var $matches array */
                foreach ($matches as $ma) {
                        if (!unlink($ma)) {
-                               \OC_Log::write('Encryption library',
-                                       'Could not delete shareKey; does not exist: "' . $ma . '"', \OC_Log::ERROR);
+                               \OCP\Util::writeLog('Encryption library',
+                                       'Could not delete shareKey; does not exist: "' . $ma . '"', \OCP\Util::ERROR);
                        }
                }
                $subdirs = $directories = glob(preg_quote($dir) . '/*', GLOB_ONLYDIR);
index 6d5b4fe5e34ba1a05c1bd0b744aebe352437bf68..5ccf0d94d371a7eb9dcd7c9615d8379585dc6f8a 100644 (file)
@@ -268,8 +268,8 @@ class Proxy extends \OC_FileProxy {
 
                // Delete keyfile & shareKey so it isn't orphaned
                if (!Keymanager::deleteFileKey($view, $owner, $ownerPath)) {
-                       \OC_Log::write('Encryption library',
-                               'Keyfile or shareKey could not be deleted for file "' . $ownerPath . '"', \OC_Log::ERROR);
+                       \OCP\Util::writeLog('Encryption library',
+                               'Keyfile or shareKey could not be deleted for file "' . $ownerPath . '"', \OCP\Util::ERROR);
                }
 
                Keymanager::delAllShareKeys($view, $owner, $ownerPath);