summaryrefslogtreecommitdiffstats
path: root/lib/public
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 /lib/public
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 'lib/public')
-rw-r--r--lib/public/ILogger.php21
-rw-r--r--lib/public/Util.php18
2 files changed, 37 insertions, 2 deletions
diff --git a/lib/public/ILogger.php b/lib/public/ILogger.php
index b6e945546e6..d3bb67b1b27 100644
--- a/lib/public/ILogger.php
+++ b/lib/public/ILogger.php
@@ -37,6 +37,27 @@ namespace OCP;
*/
interface ILogger {
/**
+ * @since 14.0.0
+ */
+ const DEBUG=0;
+ /**
+ * @since 14.0.0
+ */
+ const INFO=1;
+ /**
+ * @since 14.0.0
+ */
+ const WARN=2;
+ /**
+ * @since 14.0.0
+ */
+ const ERROR=3;
+ /**
+ * @since 14.0.0
+ */
+ const FATAL=4;
+
+ /**
* System is unusable.
*
* @param string $message
diff --git a/lib/public/Util.php b/lib/public/Util.php
index 9ffa55e2dfd..0e32d8473a5 100644
--- a/lib/public/Util.php
+++ b/lib/public/Util.php
@@ -57,11 +57,25 @@ namespace OCP;
* @since 4.0.0
*/
class Util {
- // consts for Logging
+ /**
+ * @deprecated 14.0.0 use \OCP\ILogger::DEBUG
+ */
const DEBUG=0;
+ /**
+ * @deprecated 14.0.0 use \OCP\ILogger::INFO
+ */
const INFO=1;
+ /**
+ * @deprecated 14.0.0 use \OCP\ILogger::WARN
+ */
const WARN=2;
+ /**
+ * @deprecated 14.0.0 use \OCP\ILogger::ERROR
+ */
const ERROR=3;
+ /**
+ * @deprecated 14.0.0 use \OCP\ILogger::FATAL
+ */
const FATAL=4;
/** \OCP\Share\IManager */
@@ -115,7 +129,7 @@ class Util {
* @since ....0.0 - parameter $level was added in 7.0.0
* @deprecated 8.2.0 use logException of \OCP\ILogger
*/
- public static function logException( $app, \Exception $ex, $level = \OCP\Util::FATAL ) {
+ public static function logException( $app, \Exception $ex, $level = ILogger::FATAL) {
\OC::$server->getLogger()->logException($ex, ['app' => $app]);
}