AbstractLogger.php
6 years ago
InvalidArgumentException.php
6 years ago
LogLevel.php
6 years ago
LoggerAwareInterface.php
6 years ago
LoggerAwareTrait.php
6 years ago
LoggerInterface.php
6 years ago
LoggerTrait.php
6 years ago
NullLogger.php
6 years ago
index.php
7 years ago
NullLogger.php
32 lines
| 1 | <?php |
| 2 | |
| 3 | namespace MailPoetVendor\Psr\Log; |
| 4 | |
| 5 | if (!defined('ABSPATH')) exit; |
| 6 | |
| 7 | |
| 8 | /** |
| 9 | * This Logger can be used to avoid conditional log calls. |
| 10 | * |
| 11 | * Logging should always be optional, and if no logger is provided to your |
| 12 | * library creating a NullLogger instance to have something to throw logs at |
| 13 | * is a good way to avoid littering your code with `if ($this->logger) { }` |
| 14 | * blocks. |
| 15 | */ |
| 16 | class NullLogger extends \MailPoetVendor\Psr\Log\AbstractLogger |
| 17 | { |
| 18 | /** |
| 19 | * Logs with an arbitrary level. |
| 20 | * |
| 21 | * @param mixed $level |
| 22 | * @param string $message |
| 23 | * @param array $context |
| 24 | * |
| 25 | * @return void |
| 26 | */ |
| 27 | public function log($level, $message, array $context = array()) |
| 28 | { |
| 29 | // noop |
| 30 | } |
| 31 | } |
| 32 |