Logging

ofetisov edited this page Aug 12, 2016 · 4 revisions

To help you debug your Judopay integration, you can attach a logger to the SDK. You can use any library that is compatible with the PSR-3 logging standard. We recommend using Monolog for logging.

For example, to log debug messages to the file 'judopay.log' using Monolog:

	use Monolog\Logger;
	use Monolog\Handler\StreamHandler;
	
	$logger = new Logger('Judopay');
	$logger->pushHandler(new StreamHandler('judopay.log'));
	$judopay = new \Judopay(
		array(
	        'apiToken' => 'your-token,
	        'apiSecret' => 'your-secret',
	        'judoId' => 'your-judo-id,
	        'logger' => $logger
		)
	);
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.