Reply
Highlighted
Regular Contributor
Posts: 50
Registered: ‎05-31-2016

PHP SDK: logging

I'm trying to set up logging in the php SDK and I'm reading the docs here: https://github.com/AuthorizeNet/sdk-php#logging

 

But I'm not quite clear on what to send using the PHP SKD, and not xml.

 

Would I log the request like this: $logger->debug($request);

And the response the same way: $logger->debug($response);

 

Also, where would I set the log level?

 

Thanks,

 

Don

Highlighted
Administrator Administrator
Administrator
Posts: 563
Registered: ‎08-03-2011

Re: PHP SDK: logging

 

Hi fifty-git,

 

You can define a file for the debugging log to write as below :  

 

define("AUTHORIZENET_LOG_FILE", "phplog");

 

Thanks,

Joy

Highlighted
New Member
Posts: 1
Registered: ‎02-04-2020

Re: PHP SDK: logging

I realize this is an old thread, but I can't figure out how to set the logging level.  My log is filled with INFO and DEBUG messages that are not necessary.  I tried:

 

define("ANET_LOG_LEVEL",ANET_LOG_ERROR);

 

but no luck.  Can anyone help me get this set to ERROR?