From 3a0099161bbaa88d53d67d20384bccc7cfe26cab Mon Sep 17 00:00:00 2001 From: Damian Mooyman Date: Thu, 16 Mar 2017 13:30:38 +1300 Subject: [PATCH] API Remove Log class --- docs/en/04_Changelogs/4.0.0.md | 2 +- src/Logging/Log.php | 61 ---------------------------------- 2 files changed, 1 insertion(+), 62 deletions(-) delete mode 100644 src/Logging/Log.php diff --git a/docs/en/04_Changelogs/4.0.0.md b/docs/en/04_Changelogs/4.0.0.md index c7d4fe1ff..683ebdf8c 100644 --- a/docs/en/04_Changelogs/4.0.0.md +++ b/docs/en/04_Changelogs/4.0.0.md @@ -1080,7 +1080,7 @@ now generally safer to use the default inherited config, where in the past you w #### General and Core Removed API * `CMSMain::buildbrokenlinks()` action is removed. -* `SS_Log::add_writer()` method is removed. +* `SS_Log` class has been removed. Use `Injector::inst()->get(LoggerInterface::class)` instead. * Removed `CMSBatchAction_Delete` * Removed `CMSBatchAction_DeleteFromLive` * Removed `CMSMain.enabled_legacy_actions` config. diff --git a/src/Logging/Log.php b/src/Logging/Log.php deleted file mode 100644 index a1a399d64..000000000 --- a/src/Logging/Log.php +++ /dev/null @@ -1,61 +0,0 @@ -get(LoggerInterface::class) instead'); - return Injector::inst()->get(LoggerInterface::class); - } - - /** - * Dispatch a message by priority level. - * - * The message parameter can be either a string (a simple error - * message), or an array of variables. The latter is useful for passing - * along a list of debug information for the writer to handle, such as - * error code, error line, error context (backtrace). - * - * @param mixed $message Exception object or array of error context variables - * @param string $priority Priority. Possible values: Log::ERR, Log::WARN, Log::NOTICE, Log::INFO or Log::DEBUG - * - * @deprecated 4.0.0:5.0.0 Use Injector::inst()->get('Logger')->log($priority, $message) instead - */ - public static function log($message, $priority) - { - Deprecation::notice('5.0', 'Use Injector::inst()->get(LoggerInterface::class)->log($priority, $message) instead'); - Injector::inst()->get(LoggerInterface::class)->log($priority, $message); - } -}