PluginProbe
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) / 1.8.13
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) v1.8.13
1.8.13.1 1.8.13 1.8.12.3 1.8.12.2 1.8.12.1 1.8.12 1.8.11.3 1.8.11.2 1.8.11.1 1.8.11 1.6.6 1.6.60 1.6.7 1.6.8 1.6.9 1.7.0 1.7.0.1 1.7.0.11 1.7.0.12 1.7.0.14 1.7.0.2 1.7.0.3 1.7.0.5 1.7.0.6 1.7.0.7 All 212 releases
charitable / vendor / stripe / stripe-php / lib / Util / DefaultLogger.php

DefaultLogger.php in Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) 1.8.13, at vendor/stripe/stripe-php/lib/Util/DefaultLogger.php

30 lines 793 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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 /** @var int */
12 public $messageType = 0;
13
14 /** @var null|string */
15 public $destination;
16
17 public function error($message, array $context = [])
18 {
19 if (\count($context) > 0) {
20 throw new \Stripe\Exception\BadMethodCallException('DefaultLogger does not currently implement context. Please implement if you need it.');
21 }
22
23 if (null === $this->destination) {
24 \error_log($message, $this->messageType);
25 } else {
26 \error_log($message, $this->messageType, $this->destination);
27 }
28 }
29 }
30