AuthorizeNet / sdk-php

PHP SDK for Authorize.Net API
Other
429 stars 403 forks source link

Support Extending Logger #378

Open joshuadwire opened 5 years ago

joshuadwire commented 5 years ago

I'd like to integrate the SDK with my existing logging framework rather than having it log directly to a file.

I think the easiest way to support this would be to modify the LogFactory class to support either setting the logger or setting the log class.

It would also be very helpful for the existing Log class to have most of the methods be protected instead of private so it can be extended more easily.

Thoughts on this implementation? I'd be glad to submit a pull request if that will help.

abishekrsrikaanth commented 4 years ago

I feel a better implementation would be to use https://github.com/Seldaek/monolog that allows specifying your own handler irrespective of what the SDK uses,

joshuadwire commented 4 years ago

@abishekrsrikaanth I agree. Using Monolog would be best, but I'd be happy with anything that lets me override the logging functionality without using Reflection.