{"action":"created","issue":{"url":"https://api.github.com/repos/octokit/rest.js/issues/779","repository_url":"https://api.github.com/repos/octokit/rest.js","labels_url":"https://api.github.com/repos/octokit/rest.js/issues/779/labels{/name}","comments_url":"https://api.github.com/repos/octokit/rest.js/issues/779/comments","events_url":"https://api.github.com/repos/octokit/rest.js/issues/779/events","html_url":"https://github.com/octokit/rest.js/issues/779","id":301932921,"number":779,"title":"Better debugging in browser (and Node)","user":{"login":"gr2m","id":39992,"avatar_url":"https://avatars3.githubusercontent.com/u/39992?v=4","gravatar_id":"","url":"https://api.github.com/users/gr2m","html_url":"https://github.com/gr2m","followers_url":"https://api.github.com/users/gr2m/followers","following_url":"https://api.github.com/users/gr2m/following{/other_user}","gists_url":"https://api.github.com/users/gr2m/gists{/gist_id}","starred_url":"https://api.github.com/users/gr2m/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gr2m/subscriptions","organizations_url":"https://api.github.com/users/gr2m/orgs","repos_url":"https://api.github.com/users/gr2m/repos","events_url":"https://api.github.com/users/gr2m/events{/privacy}","received_events_url":"https://api.github.com/users/gr2m/received_events","type":"User","site_admin":false},"labels":[{"id":694534871,"url":"https://api.github.com/repos/octokit/rest.js/labels/pinned","name":"pinned","color":"ffffff","default":false},{"id":736976101,"url":"https://api.github.com/repos/octokit/rest.js/labels/question","name":"question","color":"111111","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/octokit/rest.js/milestones/3","html_url":"https://github.com/octokit/rest.js/milestone/3","labels_url":"https://api.github.com/repos/octokit/rest.js/milestones/3/labels","id":2997463,"number":3,"title":"v16.0.0 - Revise APIs","description":"Plugin Architecture, Preview APIs, Official Plugins, Plugin registry","creator":{"login":"gr2m","id":39992,"avatar_url":"https://avatars3.githubusercontent.com/u/39992?v=4","gravatar_id":"","url":"https://api.github.com/users/gr2m","html_url":"https://github.com/gr2m","followers_url":"https://api.github.com/users/gr2m/followers","following_url":"https://api.github.com/users/gr2m/following{/other_user}","gists_url":"https://api.github.com/users/gr2m/gists{/gist_id}","starred_url":"https://api.github.com/users/gr2m/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gr2m/subscriptions","organizations_url":"https://api.github.com/users/gr2m/orgs","repos_url":"https://api.github.com/users/gr2m/repos","events_url":"https://api.github.com/users/gr2m/events{/privacy}","received_events_url":"https://api.github.com/users/gr2m/received_events","type":"User","site_admin":false},"open_issues":17,"closed_issues":3,"state":"open","created_at":"2017-12-26T02:56:34Z","updated_at":"2018-03-08T16:34:50Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2018-03-02T23:02:09Z","updated_at":"2018-03-21T14:30:55Z","closed_at":null,"author_association":"COLLABORATOR","body":"The `debug` option has been removed in [v13.0.0](https://github.com/octokit/rest.js/releases/tag/v13.0.0) in favour of just using the [debug](https://www.npmjs.com/package/debug) module. \r\n\r\nNow that browser usage and with it a smaller bundle size becomes more important, I would suggest we add a `log` or `console` option to the [Octokit Client options](https://github.com/octokit/rest.js/tree/a3693becdc6b5ba41fc6d0f6f560ab9bb4e96d82#client-options)\r\n\r\nIn node, it would default to an object with `{debug, info, warn, error}` functions that use [debug](https://www.npmjs.com/package/debug) internally. In the browser, it would default to `window.console` or an empty function, I’m not yet sure. But the idea is that the `log` or `console` function will be compatible with the `console` object in both Node & Browser.\r\n\r\nFor people who would like to be able to set a log level we can recommend [console-log-level](https://www.npmjs.com/package/console-log-level) in the README. It’s easy enough to add when needed, without bloating up the bundle size for everyone."},"comment":{"url":"https://api.github.com/repos/octokit/rest.js/issues/comments/374957249","html_url":"https://github.com/octokit/rest.js/issues/779#issuecomment-374957249","issue_url":"https://api.github.com/repos/octokit/rest.js/issues/779","id":374957249,"user":{"login":"rdohms","id":94331,"avatar_url":"https://avatars0.githubusercontent.com/u/94331?v=4","gravatar_id":"","url":"https://api.github.com/users/rdohms","html_url":"https://github.com/rdohms","followers_url":"https://api.github.com/users/rdohms/followers","following_url":"https://api.github.com/users/rdohms/following{/other_user}","gists_url":"https://api.github.com/users/rdohms/gists{/gist_id}","starred_url":"https://api.github.com/users/rdohms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rdohms/subscriptions","organizations_url":"https://api.github.com/users/rdohms/orgs","repos_url":"https://api.github.com/users/rdohms/repos","events_url":"https://api.github.com/users/rdohms/events{/privacy}","received_events_url":"https://api.github.com/users/rdohms/received_events","type":"User","site_admin":false},"created_at":"2018-03-21T14:30:55Z","updated_at":"2018-03-21T14:30:55Z","author_association":"CONTRIBUTOR","body":"I'm having similar issues, we log our bot's output to cloudwatch and that is done in json format, but the output of github being run with debug cannot be changed to use json format, meaning each line becomes a log entry on cloudwatch.\r\n\r\nI have been trying ways of hijacking `debug()` and piping it into our logger, but have had no success yet. This may be an interesting feature requirement to take into consideration."}}
{"actor":{"display_login":"rdohms"}}