sdk-php
sdk-php copied to clipboard
Support Extending Logger
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.
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,
@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.