]> source.dussan.org Git - nextcloud-server.git/commitdiff
Rename to NullQueryLogger
authorRobin Appelman <icewind@owncloud.com>
Tue, 14 Oct 2014 13:49:00 +0000 (15:49 +0200)
committerRobin Appelman <icewind@owncloud.com>
Mon, 20 Oct 2014 11:38:38 +0000 (13:38 +0200)
lib/private/diagnostics/dummyeventlogger.php [deleted file]
lib/private/diagnostics/dummyquerylogger.php [deleted file]
lib/private/diagnostics/nulleventlogger.php [new file with mode: 0644]
lib/private/diagnostics/nullquerylogger.php [new file with mode: 0644]
lib/private/server.php

diff --git a/lib/private/diagnostics/dummyeventlogger.php b/lib/private/diagnostics/dummyeventlogger.php
deleted file mode 100644 (file)
index f1386d2..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-/**
- * Copyright (c) 2014 Robin Appelman <icewind@owncloud.com>
- * This file is licensed under the Affero General Public License version 3 or
- * later.
- * See the COPYING-README file.
- */
-
-namespace OC\Diagnostics;
-
-use OCP\Diagnostics\IEventLogger;
-
-/**
- * Dummy event logger that doesn't actually log anything
- */
-class DummyEventLogger implements IEventLogger {
-       /**
-        * Mark the start of an event
-        *
-        * @param $id
-        * @param $description
-        */
-       public function start($id, $description) {
-       }
-
-       /**
-        * Mark the end of an event
-        *
-        * @param $id
-        */
-       public function end($id) {
-       }
-
-       /**
-        * @return \OCP\Diagnostics\IEvent[]
-        */
-       public function getEvents(){
-               return array();
-       }
-}
diff --git a/lib/private/diagnostics/dummyquerylogger.php b/lib/private/diagnostics/dummyquerylogger.php
deleted file mode 100644 (file)
index 1617b20..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<?php
-/**
- * Copyright (c) 2014 Robin Appelman <icewind@owncloud.com>
- * This file is licensed under the Affero General Public License version 3 or
- * later.
- * See the COPYING-README file.
- */
-
-namespace OC\Diagnostics;
-
-use OCP\Diagnostics\IQueryLogger;
-
-class DummyQueryLogger implements IQueryLogger {
-       /**
-        * @param string $sql
-        * @param array $params
-        * @param array $types
-        */
-       public function startQuery($sql, array $params = null, array $types = null) {
-       }
-
-       public function stopQuery() {
-       }
-
-       /**
-        * @return \OCP\Diagnostics\IQuery[]
-        */
-       public function getQueries() {
-               return array();
-       }
-}
diff --git a/lib/private/diagnostics/nulleventlogger.php b/lib/private/diagnostics/nulleventlogger.php
new file mode 100644 (file)
index 0000000..fd71ee9
--- /dev/null
@@ -0,0 +1,40 @@
+<?php
+/**
+ * Copyright (c) 2014 Robin Appelman <icewind@owncloud.com>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+namespace OC\Diagnostics;
+
+use OCP\Diagnostics\IEventLogger;
+
+/**
+ * Dummy event logger that doesn't actually log anything
+ */
+class NullEventLogger implements IEventLogger {
+       /**
+        * Mark the start of an event
+        *
+        * @param $id
+        * @param $description
+        */
+       public function start($id, $description) {
+       }
+
+       /**
+        * Mark the end of an event
+        *
+        * @param $id
+        */
+       public function end($id) {
+       }
+
+       /**
+        * @return \OCP\Diagnostics\IEvent[]
+        */
+       public function getEvents(){
+               return array();
+       }
+}
diff --git a/lib/private/diagnostics/nullquerylogger.php b/lib/private/diagnostics/nullquerylogger.php
new file mode 100644 (file)
index 0000000..8467b4d
--- /dev/null
@@ -0,0 +1,31 @@
+<?php
+/**
+ * Copyright (c) 2014 Robin Appelman <icewind@owncloud.com>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+namespace OC\Diagnostics;
+
+use OCP\Diagnostics\IQueryLogger;
+
+class NullQueryLogger implements IQueryLogger {
+       /**
+        * @param string $sql
+        * @param array $params
+        * @param array $types
+        */
+       public function startQuery($sql, array $params = null, array $types = null) {
+       }
+
+       public function stopQuery() {
+       }
+
+       /**
+        * @return \OCP\Diagnostics\IQuery[]
+        */
+       public function getQueries() {
+               return array();
+       }
+}
index 496c26e25030cd4834fcefd81f0e2164d9f829c6..f7ffee484ea13b97d4e0697ecee9d7af77d549b4 100644 (file)
@@ -6,7 +6,7 @@ use OC\AppFramework\Http\Request;
 use OC\AppFramework\Db\Db;
 use OC\AppFramework\Utility\SimpleContainer;
 use OC\Cache\UserCache;
-use OC\Diagnostics\DummyQueryLogger;
+use OC\Diagnostics\NullQueryLogger;
 use OC\Diagnostics\EventLogger;
 use OC\Diagnostics\QueryLogger;
 use OC\Security\CertificateManager;
@@ -15,7 +15,7 @@ use OC\Files\Node\Root;
 use OC\Files\View;
 use OC\Security\Crypto;
 use OC\Security\SecureRandom;
-use OC\Diagnostics\DummyEventLogger;
+use OC\Diagnostics\NullEventLogger;
 use OCP\IServerContainer;
 use OCP\ISession;
 use OC\Tagging\TagMapper;
@@ -229,14 +229,14 @@ class Server extends SimpleContainer implements IServerContainer {
                        if (defined('DEBUG') and DEBUG) {
                                return new EventLogger();
                        } else {
-                               return new DummyEventLogger();
+                               return new NullEventLogger();
                        }
                });
                $this->registerService('QueryLogger', function ($c) {
                        if (defined('DEBUG') and DEBUG) {
                                return new QueryLogger();
                        } else {
-                               return new DummyQueryLogger();
+                               return new NullQueryLogger();
                        }
                });
        }