forked from LiveCarta/PayPal-PHP-SDK
Enabled Factory to Inject Logger
This commit is contained in:
26
lib/PayPal/Log/PayPalDefaultLogFactory.php
Normal file
26
lib/PayPal/Log/PayPalDefaultLogFactory.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace PayPal\Log;
|
||||
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
/**
|
||||
* Class PayPalDefaultLogFactory
|
||||
*
|
||||
* This factory is the default implementation of Log factory.
|
||||
*
|
||||
* @package PayPal\Log
|
||||
*/
|
||||
class PayPalDefaultLogFactory implements PayPalLogFactory
|
||||
{
|
||||
/**
|
||||
* Returns logger instance implementing LoggerInterface.
|
||||
*
|
||||
* @param string $className
|
||||
* @return LoggerInterface instance of logger object implementing LoggerInterface
|
||||
*/
|
||||
public function getLogger($className)
|
||||
{
|
||||
return new PayPalLogger($className);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user