PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.15.0
GiveWP – Donation Plugin and Fundraising Platform v4.15.0
4.16.9 4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 All 255 releases
give / vendor / stripe / stripe-php / lib / Util / DefaultLogger.php

DefaultLogger.php in GiveWP – Donation Plugin and Fundraising Platform 4.15.0, 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