{"action":"created","issue":{"url":"https://api.github.com/repos/recurly/recurly-client-php/issues/138","repository_url":"https://api.github.com/repos/recurly/recurly-client-php","labels_url":"https://api.github.com/repos/recurly/recurly-client-php/issues/138/labels{/name}","comments_url":"https://api.github.com/repos/recurly/recurly-client-php/issues/138/comments","events_url":"https://api.github.com/repos/recurly/recurly-client-php/issues/138/events","html_url":"https://github.com/recurly/recurly-client-php/pull/138","id":57001878,"number":138,"title":"126 psr3 logger for v2.41","user":{"login":"reden-tm","id":10120850,"avatar_url":"https://avatars.githubusercontent.com/u/10120850?v=3","gravatar_id":"","url":"https://api.github.com/users/reden-tm","html_url":"https://github.com/reden-tm","followers_url":"https://api.github.com/users/reden-tm/followers","following_url":"https://api.github.com/users/reden-tm/following{/other_user}","gists_url":"https://api.github.com/users/reden-tm/gists{/gist_id}","starred_url":"https://api.github.com/users/reden-tm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reden-tm/subscriptions","organizations_url":"https://api.github.com/users/reden-tm/orgs","repos_url":"https://api.github.com/users/reden-tm/repos","events_url":"https://api.github.com/users/reden-tm/events{/privacy}","received_events_url":"https://api.github.com/users/reden-tm/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/recurly/recurly-client-php/labels/new%20feature","name":"new feature","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2015-02-09T08:31:57Z","updated_at":"2016-07-25T21:43:49Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/recurly/recurly-client-php/pulls/138","html_url":"https://github.com/recurly/recurly-client-php/pull/138","diff_url":"https://github.com/recurly/recurly-client-php/pull/138.diff","patch_url":"https://github.com/recurly/recurly-client-php/pull/138.patch"},"body":"This PR addresses #126, providing a similar logging facility as the ruby client.\r\n\r\nAs discussed in #126, the php-fig PSR-3 logging interface has been incorporated into the Recurly_Client class.  I chose to adopt the existing paradigm for setting up the Recurly client with static variables to setup the logger.  Using the logger is optional.\r\n\r\nHere's an example for how to use logging with the PSR-3 compliant [monolog](https://github.com/Seldaek/monolog) library\r\n\r\n```php\r\n<?php\r\n\r\nuse Monolog\\Logger;\r\nuse Monolog\\Handler\\StreamHandler;\r\n\r\nrequire_once('lib/recurly.php');\r\n\r\n// Required for the API\r\nRecurly_Client::$subdomain = 'your-subdomain';\r\nRecurly_Client::$apiKey = 'abcdef01234567890abcdef01234567890';\r\n\r\n// create a log channel, add a log handler, and record all DEBUG level and higher\r\n$logger = new Logger('recurly');\r\n$logger->pushHandler(new StreamHandler('path/to/recurly.log', Logger::DEBUG));\r\n\r\n// tell Recurly_Client to use the logger\r\nRecurly_Client::$logger = $logger;\r\n```\r\n\r\nI wasn't sure what to have the actual messages say in the request and response section. Feel fee to modify."},"comment":{"url":"https://api.github.com/repos/recurly/recurly-client-php/issues/comments/235095229","html_url":"https://github.com/recurly/recurly-client-php/pull/138#issuecomment-235095229","issue_url":"https://api.github.com/repos/recurly/recurly-client-php/issues/138","id":235095229,"user":{"login":"hedinfaok","id":4027036,"avatar_url":"https://avatars.githubusercontent.com/u/4027036?v=3","gravatar_id":"","url":"https://api.github.com/users/hedinfaok","html_url":"https://github.com/hedinfaok","followers_url":"https://api.github.com/users/hedinfaok/followers","following_url":"https://api.github.com/users/hedinfaok/following{/other_user}","gists_url":"https://api.github.com/users/hedinfaok/gists{/gist_id}","starred_url":"https://api.github.com/users/hedinfaok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hedinfaok/subscriptions","organizations_url":"https://api.github.com/users/hedinfaok/orgs","repos_url":"https://api.github.com/users/hedinfaok/repos","events_url":"https://api.github.com/users/hedinfaok/events{/privacy}","received_events_url":"https://api.github.com/users/hedinfaok/received_events","type":"User","site_admin":false},"created_at":"2016-07-25T21:43:49Z","updated_at":"2016-07-25T21:43:49Z","body":"@drewish I'm at a different employer now. LMK if I can help at all."}}
{"actor":{"display_login":"hedinfaok"}}