{"action":"created","comment":{"url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/pulls/comments/142438665","pull_request_review_id":66799633,"id":142438665,"diff_hunk":"@@ -0,0 +1,53 @@\n+require \"logger\"\n+require \"bugsnag\"\n+require \"bugsnag/loggers/log_device\"\n+\n+module Bugsnag::Loggers\n+\n+  SEVERITIES = [\n+    \"debug\",\n+    \"info\",\n+    \"warn\",\n+    \"error\",\n+    \"fatal\",\n+    \"unknown\"\n+  ]\n+\n+  class Logger < Logger\n+\n+    def initialize(level=Logger::INFO)\n+      @open = true\n+      @log_device = Bugsnag::Loggers::LogDevice.new\n+      super @log_device, level","path":"lib/bugsnag/loggers/logger.rb","position":21,"original_position":21,"commit_id":"f2619a7ed7895104797707663c211e2e6d90f366","original_commit_id":"f2619a7ed7895104797707663c211e2e6d90f366","user":{"login":"Cawllec","id":7754028,"avatar_url":"https://avatars2.githubusercontent.com/u/7754028?v=4","gravatar_id":"","url":"https://api.github.com/users/Cawllec","html_url":"https://github.com/Cawllec","followers_url":"https://api.github.com/users/Cawllec/followers","following_url":"https://api.github.com/users/Cawllec/following{/other_user}","gists_url":"https://api.github.com/users/Cawllec/gists{/gist_id}","starred_url":"https://api.github.com/users/Cawllec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cawllec/subscriptions","organizations_url":"https://api.github.com/users/Cawllec/orgs","repos_url":"https://api.github.com/users/Cawllec/repos","events_url":"https://api.github.com/users/Cawllec/events{/privacy}","received_events_url":"https://api.github.com/users/Cawllec/received_events","type":"User","site_admin":false},"body":"You're right, there is no advantage.  I'll remove this.  For some reason I assumed the logger base class wouldn't be happy being passed nil, but it's quite happy.","created_at":"2017-10-03T15:36:24Z","updated_at":"2017-10-03T15:36:24Z","html_url":"https://github.com/bugsnag/bugsnag-ruby/pull/375#discussion_r142438665","pull_request_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/pulls/375","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/bugsnag/bugsnag-ruby/pulls/comments/142438665"},"html":{"href":"https://github.com/bugsnag/bugsnag-ruby/pull/375#discussion_r142438665"},"pull_request":{"href":"https://api.github.com/repos/bugsnag/bugsnag-ruby/pulls/375"}},"in_reply_to_id":142434601},"pull_request":{"url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/pulls/375","id":144445980,"html_url":"https://github.com/bugsnag/bugsnag-ruby/pull/375","diff_url":"https://github.com/bugsnag/bugsnag-ruby/pull/375.diff","patch_url":"https://github.com/bugsnag/bugsnag-ruby/pull/375.patch","issue_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/issues/375","number":375,"state":"open","locked":false,"title":"Added basic logger/log-device and tests","user":{"login":"Cawllec","id":7754028,"avatar_url":"https://avatars2.githubusercontent.com/u/7754028?v=4","gravatar_id":"","url":"https://api.github.com/users/Cawllec","html_url":"https://github.com/Cawllec","followers_url":"https://api.github.com/users/Cawllec/followers","following_url":"https://api.github.com/users/Cawllec/following{/other_user}","gists_url":"https://api.github.com/users/Cawllec/gists{/gist_id}","starred_url":"https://api.github.com/users/Cawllec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cawllec/subscriptions","organizations_url":"https://api.github.com/users/Cawllec/orgs","repos_url":"https://api.github.com/users/Cawllec/repos","events_url":"https://api.github.com/users/Cawllec/events{/privacy}","received_events_url":"https://api.github.com/users/Cawllec/received_events","type":"User","site_admin":false},"body":"## Additions\r\n- Adds a logger to track events output to a logger to breadcrumbs\r\n- `BugsnagLogger` can be assigned to any interface that uses a Logger, such as `ActiveRecord::Base.logger` or `Mongoid::Loggable.logger`\r\n- Subclasses `Logger` with identical api\r\n\r\n## Discussion\r\n- Mutually exclusive with #373 \r\n\r\n## TODO\r\n- Add [logging](https://github.com/TwP/logging) appender & tests\r\n- Needs examples/documenting","created_at":"2017-10-03T14:59:20Z","updated_at":"2017-10-03T15:36:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"38ce76dc20b9235f3119efada285fdeb39bd5f22","assignee":null,"assignees":[],"requested_reviewers":[{"login":"snmaynard","id":829837,"avatar_url":"https://avatars3.githubusercontent.com/u/829837?v=4","gravatar_id":"","url":"https://api.github.com/users/snmaynard","html_url":"https://github.com/snmaynard","followers_url":"https://api.github.com/users/snmaynard/followers","following_url":"https://api.github.com/users/snmaynard/following{/other_user}","gists_url":"https://api.github.com/users/snmaynard/gists{/gist_id}","starred_url":"https://api.github.com/users/snmaynard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snmaynard/subscriptions","organizations_url":"https://api.github.com/users/snmaynard/orgs","repos_url":"https://api.github.com/users/snmaynard/repos","events_url":"https://api.github.com/users/snmaynard/events{/privacy}","received_events_url":"https://api.github.com/users/snmaynard/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/pulls/375/commits","review_comments_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/pulls/375/comments","review_comment_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/issues/375/comments","statuses_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/statuses/f2619a7ed7895104797707663c211e2e6d90f366","head":{"label":"bugsnag:cawllec/appender-breadcrumbs","ref":"cawllec/appender-breadcrumbs","sha":"f2619a7ed7895104797707663c211e2e6d90f366","user":{"login":"bugsnag","id":1058895,"avatar_url":"https://avatars2.githubusercontent.com/u/1058895?v=4","gravatar_id":"","url":"https://api.github.com/users/bugsnag","html_url":"https://github.com/bugsnag","followers_url":"https://api.github.com/users/bugsnag/followers","following_url":"https://api.github.com/users/bugsnag/following{/other_user}","gists_url":"https://api.github.com/users/bugsnag/gists{/gist_id}","starred_url":"https://api.github.com/users/bugsnag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bugsnag/subscriptions","organizations_url":"https://api.github.com/users/bugsnag/orgs","repos_url":"https://api.github.com/users/bugsnag/repos","events_url":"https://api.github.com/users/bugsnag/events{/privacy}","received_events_url":"https://api.github.com/users/bugsnag/received_events","type":"Organization","site_admin":false},"repo":{"id":2545189,"name":"bugsnag-ruby","full_name":"bugsnag/bugsnag-ruby","owner":{"login":"bugsnag","id":1058895,"avatar_url":"https://avatars2.githubusercontent.com/u/1058895?v=4","gravatar_id":"","url":"https://api.github.com/users/bugsnag","html_url":"https://github.com/bugsnag","followers_url":"https://api.github.com/users/bugsnag/followers","following_url":"https://api.github.com/users/bugsnag/following{/other_user}","gists_url":"https://api.github.com/users/bugsnag/gists{/gist_id}","starred_url":"https://api.github.com/users/bugsnag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bugsnag/subscriptions","organizations_url":"https://api.github.com/users/bugsnag/orgs","repos_url":"https://api.github.com/users/bugsnag/repos","events_url":"https://api.github.com/users/bugsnag/events{/privacy}","received_events_url":"https://api.github.com/users/bugsnag/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bugsnag/bugsnag-ruby","description":"Bugsnag error monitoring for rails, sinatra, rack and ruby","fork":false,"url":"https://api.github.com/repos/bugsnag/bugsnag-ruby","forks_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/forks","keys_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/teams","hooks_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/hooks","issue_events_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/issues/events{/number}","events_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/events","assignees_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/assignees{/user}","branches_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/branches{/branch}","tags_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/tags","blobs_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/git/refs{/sha}","trees_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/statuses/{sha}","languages_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/languages","stargazers_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/stargazers","contributors_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/contributors","subscribers_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/subscribers","subscription_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/subscription","commits_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/commits{/sha}","git_commits_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/git/commits{/sha}","comments_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/comments{/number}","issue_comment_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/issues/comments{/number}","contents_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/contents/{+path}","compare_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/merges","archive_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/downloads","issues_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/issues{/number}","pulls_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/pulls{/number}","milestones_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/milestones{/number}","notifications_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/labels{/name}","releases_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/releases{/id}","deployments_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/deployments","created_at":"2011-10-10T00:15:17Z","updated_at":"2017-09-21T13:24:32Z","pushed_at":"2017-10-03T14:59:20Z","git_url":"git://github.com/bugsnag/bugsnag-ruby.git","ssh_url":"git@github.com:bugsnag/bugsnag-ruby.git","clone_url":"https://github.com/bugsnag/bugsnag-ruby.git","svn_url":"https://github.com/bugsnag/bugsnag-ruby","homepage":"https://docs.bugsnag.com/platforms/ruby","size":1081,"stargazers_count":145,"watchers_count":145,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":118,"mirror_url":null,"open_issues_count":20,"forks":118,"open_issues":20,"watchers":145,"default_branch":"master"}},"base":{"label":"bugsnag:cawllec/breadcrumbs","ref":"cawllec/breadcrumbs","sha":"8d7a6c8c79196871e18e65e37949ca2607ff67ec","user":{"login":"bugsnag","id":1058895,"avatar_url":"https://avatars2.githubusercontent.com/u/1058895?v=4","gravatar_id":"","url":"https://api.github.com/users/bugsnag","html_url":"https://github.com/bugsnag","followers_url":"https://api.github.com/users/bugsnag/followers","following_url":"https://api.github.com/users/bugsnag/following{/other_user}","gists_url":"https://api.github.com/users/bugsnag/gists{/gist_id}","starred_url":"https://api.github.com/users/bugsnag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bugsnag/subscriptions","organizations_url":"https://api.github.com/users/bugsnag/orgs","repos_url":"https://api.github.com/users/bugsnag/repos","events_url":"https://api.github.com/users/bugsnag/events{/privacy}","received_events_url":"https://api.github.com/users/bugsnag/received_events","type":"Organization","site_admin":false},"repo":{"id":2545189,"name":"bugsnag-ruby","full_name":"bugsnag/bugsnag-ruby","owner":{"login":"bugsnag","id":1058895,"avatar_url":"https://avatars2.githubusercontent.com/u/1058895?v=4","gravatar_id":"","url":"https://api.github.com/users/bugsnag","html_url":"https://github.com/bugsnag","followers_url":"https://api.github.com/users/bugsnag/followers","following_url":"https://api.github.com/users/bugsnag/following{/other_user}","gists_url":"https://api.github.com/users/bugsnag/gists{/gist_id}","starred_url":"https://api.github.com/users/bugsnag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bugsnag/subscriptions","organizations_url":"https://api.github.com/users/bugsnag/orgs","repos_url":"https://api.github.com/users/bugsnag/repos","events_url":"https://api.github.com/users/bugsnag/events{/privacy}","received_events_url":"https://api.github.com/users/bugsnag/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bugsnag/bugsnag-ruby","description":"Bugsnag error monitoring for rails, sinatra, rack and ruby","fork":false,"url":"https://api.github.com/repos/bugsnag/bugsnag-ruby","forks_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/forks","keys_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/teams","hooks_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/hooks","issue_events_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/issues/events{/number}","events_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/events","assignees_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/assignees{/user}","branches_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/branches{/branch}","tags_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/tags","blobs_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/git/refs{/sha}","trees_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/statuses/{sha}","languages_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/languages","stargazers_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/stargazers","contributors_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/contributors","subscribers_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/subscribers","subscription_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/subscription","commits_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/commits{/sha}","git_commits_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/git/commits{/sha}","comments_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/comments{/number}","issue_comment_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/issues/comments{/number}","contents_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/contents/{+path}","compare_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/merges","archive_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/downloads","issues_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/issues{/number}","pulls_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/pulls{/number}","milestones_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/milestones{/number}","notifications_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/labels{/name}","releases_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/releases{/id}","deployments_url":"https://api.github.com/repos/bugsnag/bugsnag-ruby/deployments","created_at":"2011-10-10T00:15:17Z","updated_at":"2017-09-21T13:24:32Z","pushed_at":"2017-10-03T14:59:20Z","git_url":"git://github.com/bugsnag/bugsnag-ruby.git","ssh_url":"git@github.com:bugsnag/bugsnag-ruby.git","clone_url":"https://github.com/bugsnag/bugsnag-ruby.git","svn_url":"https://github.com/bugsnag/bugsnag-ruby","homepage":"https://docs.bugsnag.com/platforms/ruby","size":1081,"stargazers_count":145,"watchers_count":145,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":118,"mirror_url":null,"open_issues_count":20,"forks":118,"open_issues":20,"watchers":145,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bugsnag/bugsnag-ruby/pulls/375"},"html":{"href":"https://github.com/bugsnag/bugsnag-ruby/pull/375"},"issue":{"href":"https://api.github.com/repos/bugsnag/bugsnag-ruby/issues/375"},"comments":{"href":"https://api.github.com/repos/bugsnag/bugsnag-ruby/issues/375/comments"},"review_comments":{"href":"https://api.github.com/repos/bugsnag/bugsnag-ruby/pulls/375/comments"},"review_comment":{"href":"https://api.github.com/repos/bugsnag/bugsnag-ruby/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bugsnag/bugsnag-ruby/pulls/375/commits"},"statuses":{"href":"https://api.github.com/repos/bugsnag/bugsnag-ruby/statuses/f2619a7ed7895104797707663c211e2e6d90f366"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Cawllec"}}