From 74b85e3779c77a1c2c52aa5d4db07871aa055ce2 Mon Sep 17 00:00:00 2001 From: Matthieu Napoli Date: Mon, 15 Dec 2014 11:56:50 +1300 Subject: #6622 Logger refactoring: deprecated Piwik\Log in favor of Psr\Log\LoggerInterface --- core/Log.php | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'core/Log.php') diff --git a/core/Log.php b/core/Log.php index 9ce5d5f8a2..d449f1be5a 100644 --- a/core/Log.php +++ b/core/Log.php @@ -95,6 +95,9 @@ use Psr\Log\LoggerInterface; * $debugInfo = new MyDebugInfo($unexpectedError, $myThirdPartyServiceClient); * Log::debug($debugInfo); * } + * + * @deprecated Inject and use Psr\Log\LoggerInterface instead of this class. + * @see \Psr\Log\LoggerInterface */ class Log extends Singleton { @@ -164,6 +167,9 @@ class Log extends Singleton * @param string $message The log message. This can be a sprintf format string. * @param ... mixed Optional sprintf params. * @api + * + * @deprecated Inject and call Psr\Log\LoggerInterface::error() instead. + * @see \Psr\Log\LoggerInterface::error() */ public static function error($message /* ... */) { @@ -176,6 +182,9 @@ class Log extends Singleton * @param string $message The log message. This can be a sprintf format string. * @param ... mixed Optional sprintf params. * @api + * + * @deprecated Inject and call Psr\Log\LoggerInterface::warning() instead. + * @see \Psr\Log\LoggerInterface::warning() */ public static function warning($message /* ... */) { @@ -188,6 +197,9 @@ class Log extends Singleton * @param string $message The log message. This can be a sprintf format string. * @param ... mixed Optional sprintf params. * @api + * + * @deprecated Inject and call Psr\Log\LoggerInterface::info() instead. + * @see \Psr\Log\LoggerInterface::info() */ public static function info($message /* ... */) { @@ -200,6 +212,9 @@ class Log extends Singleton * @param string $message The log message. This can be a sprintf format string. * @param ... mixed Optional sprintf params. * @api + * + * @deprecated Inject and call Psr\Log\LoggerInterface::debug() instead. + * @see \Psr\Log\LoggerInterface::debug() */ public static function debug($message /* ... */) { @@ -212,6 +227,9 @@ class Log extends Singleton * @param string $message The log message. This can be a sprintf format string. * @param ... mixed Optional sprintf params. * @api + * + * @deprecated Inject and call Psr\Log\LoggerInterface::debug() instead (the verbose level doesn't exist in the PSR standard). + * @see \Psr\Log\LoggerInterface::debug() */ public static function verbose($message /* ... */) { @@ -220,14 +238,14 @@ class Log extends Singleton /** * @param int $logLevel - * @deprecated Will be removed + * @deprecated Will be removed, log levels are now applied on each Monolog handler. */ public function setLogLevel($logLevel) { } /** - * @deprecated Will be removed + * @deprecated Will be removed, log levels are now applied on each Monolog handler. */ public function getLogLevel() { -- cgit v1.2.3