PluginProbe
Booktics – Appointment Booking Calendar for Service Businesses / 1.0.28
Booktics – Appointment Booking Calendar for Service Businesses v1.0.28
1.0.29 1.0.28 1.0.27 1.0.26 1.0.25 1.0.24 1.0.23 1.0.22 1.0.21 1.0.20 1.0.19 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.2 1.0.3 All 31 releases
booktics / vendor / stripe / stripe-php / lib / Util / DefaultLogger.php

DefaultLogger.php in Booktics – Appointment Booking Calendar for Service Businesses 1.0.28, 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