mangopay2-php-sdk icon indicating copy to clipboard operation
mangopay2-php-sdk copied to clipboard

chore: use logger context

Open mRoca opened this issue 1 year ago • 0 comments

This PR replaces all $this->logger->debug('Response JSON : ' . print_r($responseResult->Body, true)); by 2 logs (request and response) with a static message and all variable data passed in the context.

This refacto allows using a custom Logger and getting variable data without parsing actual log messages in order to transform print_r strings back into php or json array.

Debug calls have been refactored in order to avoid duplication of if ($this->_root->Config->DebugMode) {

mRoca avatar Oct 15 '24 16:10 mRoca