AutoPagingIterator.php
6 years ago
CaseInsensitiveArray.php
6 years ago
DefaultLogger.php
6 years ago
LoggerInterface.php
6 years ago
RandomGenerator.php
6 years ago
RequestOptions.php
6 years ago
Set.php
6 years ago
Util.php
6 years ago
DefaultLogger.php
19 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Stripe\Util; |
| 4 | |
| 5 | /** |
| 6 | * A very basic implementation of LoggerInterface that has just enough |
| 7 | * functionality that it can be the default for this library. |
| 8 | */ |
| 9 | class DefaultLogger implements LoggerInterface |
| 10 | { |
| 11 | public function error($message, array $context = []) |
| 12 | { |
| 13 | if (count($context) > 0) { |
| 14 | throw new \Exception('DefaultLogger does not currently implement context. Please implement if you need it.'); |
| 15 | } |
| 16 | error_log($message); |
| 17 | } |
| 18 | } |
| 19 |