forked from LiveCarta/PayPal-PHP-SDK
Enabled Factory to Inject Logger
This commit is contained in:
@@ -86,11 +86,11 @@ function getApiContext($clientId, $clientSecret)
|
||||
'mode' => 'sandbox',
|
||||
'log.LogEnabled' => true,
|
||||
'log.FileName' => '../PayPal.log',
|
||||
'log.LogLevel' => 'DEBUG', // PLEASE USE `FINE` LEVEL FOR LOGGING IN LIVE ENVIRONMENTS
|
||||
'log.LogLevel' => 'DEBUG', // PLEASE USE `INFO` LEVEL FOR LOGGING IN LIVE ENVIRONMENTS
|
||||
'cache.enabled' => true,
|
||||
// 'http.CURLOPT_CONNECTTIMEOUT' => 30
|
||||
// 'http.headers.PayPal-Partner-Attribution-Id' => '123123123'
|
||||
// 'log.Adapter' => '\Your\Custom\Logger' // Class name of the logger to be used. Must be implementing Psr\Log\LoggerInterface
|
||||
//'log.AdapterFactory' => '\PayPal\Log\DefaultLogFactory' // Factory class implementing \PayPal\Log\PayPalLogFactory
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -25,22 +25,27 @@ mode = sandbox
|
||||
|
||||
;Logging Information
|
||||
[Log]
|
||||
; For custom logging implementation, you can set the
|
||||
; logging factory provider class here.
|
||||
; The class should be implementing \PayPal\Log\PayPalLogFactory.
|
||||
; If this is not set, it will default to \PayPal\Log\PayPalDefaultLogFactory.
|
||||
;log.AdapterFactory=\PayPal\Log\PayPalDefaultLogFactory
|
||||
|
||||
; Settings for PayPalDefaultLogFactory
|
||||
log.LogEnabled=true
|
||||
|
||||
; When using a relative path, the log file is created
|
||||
; relative to the .php file that is the entry point
|
||||
; for this request. You can also provide an absolute
|
||||
; path here
|
||||
; Settings for PayPalDefaultLogFactory
|
||||
log.FileName=../PayPal.log
|
||||
|
||||
; Logging level can be one of
|
||||
; Sandbox Environments: DEBUG, INFO, WARN, ERROR
|
||||
; Live Environments: INFO, WARN, ERROR
|
||||
; Logging level can be one of any provided at \Psr\Log\LogLevel
|
||||
; Logging is most verbose in the 'DEBUG' level and
|
||||
; decreases as you proceed towards ERROR
|
||||
; DEBUG level is disabled for live, to not log sensitive information.
|
||||
; If the level is set to DEBUG, it will be reduced to FINE automatically,
|
||||
; with a warning message
|
||||
; If the level is set to DEBUG, it will be reduced to INFO automatically
|
||||
log.LogLevel=INFO
|
||||
|
||||
;Caching Configuration
|
||||
|
||||
Reference in New Issue
Block a user