From bec49cc58e0a87f23fb6a8c3a553da1b403e6b23 Mon Sep 17 00:00:00 2001 From: Larry Garfield Date: Fri, 4 Jun 2021 12:26:13 -0500 Subject: [PATCH] Fold AbstractLogger and LoggerTrait together. --- Psr/Log/AbstractLogger.php | 115 +------------------------------------ 1 file changed, 1 insertion(+), 114 deletions(-) diff --git a/Psr/Log/AbstractLogger.php b/Psr/Log/AbstractLogger.php index bda4a37..d60a091 100644 --- a/Psr/Log/AbstractLogger.php +++ b/Psr/Log/AbstractLogger.php @@ -11,118 +11,5 @@ */ abstract class AbstractLogger implements LoggerInterface { - /** - * System is unusable. - * - * @param string|\Stringable $message - * @param mixed[] $context - * - * @return void - */ - public function emergency(string|\Stringable $message, array $context = []) - { - $this->log(LogLevel::EMERGENCY, $message, $context); - } - - /** - * Action must be taken immediately. - * - * Example: Entire website down, database unavailable, etc. This should - * trigger the SMS alerts and wake you up. - * - * @param string|\Stringable $message - * @param mixed[] $context - * - * @return void - */ - public function alert(string|\Stringable $message, array $context = []) - { - $this->log(LogLevel::ALERT, $message, $context); - } - - /** - * Critical conditions. - * - * Example: Application component unavailable, unexpected exception. - * - * @param string|\Stringable $message - * @param mixed[] $context - * - * @return void - */ - public function critical(string|\Stringable $message, array $context = []) - { - $this->log(LogLevel::CRITICAL, $message, $context); - } - - /** - * Runtime errors that do not require immediate action but should typically - * be logged and monitored. - * - * @param string|\Stringable $message - * @param mixed[] $context - * - * @return void - */ - public function error(string|\Stringable $message, array $context = []) - { - $this->log(LogLevel::ERROR, $message, $context); - } - - /** - * Exceptional occurrences that are not errors. - * - * Example: Use of deprecated APIs, poor use of an API, undesirable things - * that are not necessarily wrong. - * - * @param string|\Stringable $message - * @param mixed[] $context - * - * @return void - */ - public function warning(string|\Stringable $message, array $context = []) - { - $this->log(LogLevel::WARNING, $message, $context); - } - - /** - * Normal but significant events. - * - * @param string|\Stringable $message - * @param mixed[] $context - * - * @return void - */ - public function notice(string|\Stringable $message, array $context = []) - { - $this->log(LogLevel::NOTICE, $message, $context); - } - - /** - * Interesting events. - * - * Example: User logs in, SQL logs. - * - * @param string|\Stringable $message - * @param mixed[] $context - * - * @return void - */ - public function info(string|\Stringable $message, array $context = []) - { - $this->log(LogLevel::INFO, $message, $context); - } - - /** - * Detailed debug information. - * - * @param string|\Stringable $message - * @param mixed[] $context - * - * @return void - */ - public function debug(string|\Stringable $message, array $context = []) - { - $this->log(LogLevel::DEBUG, $message, $context); - } + use LoggerTrait; }