{"action":"created","comment":{"url":"https://api.github.com/repos/puppetlabs/puppet/pulls/comments/76348039","id":76348039,"diff_hunk":"@@ -67,7 +67,7 @@ def log_exception(exception, message = :default, options = {})\n           :node => exception.node\n         }.merge(log_metadata))\n     else\n-      err(format_exception(exception, message, trace))\n+      send_log(options[:level] || :err, format_exception(exception, message, trace))","path":"lib/puppet/util/logging.rb","position":5,"original_position":5,"commit_id":"678262f7bea7edd9dccbdfe8f7948b744a0260e6","original_commit_id":"678262f7bea7edd9dccbdfe8f7948b744a0260e6","user":{"login":"Iristyle","id":394081,"avatar_url":"https://avatars.githubusercontent.com/u/394081?v=3","gravatar_id":"","url":"https://api.github.com/users/Iristyle","html_url":"https://github.com/Iristyle","followers_url":"https://api.github.com/users/Iristyle/followers","following_url":"https://api.github.com/users/Iristyle/following{/other_user}","gists_url":"https://api.github.com/users/Iristyle/gists{/gist_id}","starred_url":"https://api.github.com/users/Iristyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Iristyle/subscriptions","organizations_url":"https://api.github.com/users/Iristyle/orgs","repos_url":"https://api.github.com/users/Iristyle/repos","events_url":"https://api.github.com/users/Iristyle/events{/privacy}","received_events_url":"https://api.github.com/users/Iristyle/received_events","type":"User","site_admin":false},"body":"To take a step back on this one... why is that the transaction code needs to call `log_exception`?  And is logging exceptions at a user configurable level really something we want to allow?\r\n\r\nI get that there are a few \"helpers\" in here pulling some extra data out of the exception - but that's almost entirely related to functionality that the parser needs (added in https://github.com/puppetlabs/puppet/commit/45e3f41a38f7f4af819ed46f08c6fb8606436ed7).\r\n\r\nIs there a reason to not instead just call `Puppet.info` at https://github.com/puppetlabs/puppet/blob/stable/lib/puppet/property.rb#L370 like this instead?\r\n\r\n```\r\nPuppet.info(\"Unknown failure comparing values #{should} and #{is} using insync? on type: #{self.resource.ref} property: #{self.name}\")\r\n```\r\n\r\nThen you don't have to touch this shared logging method... ","created_at":"2016-08-26T00:20:47Z","updated_at":"2016-08-26T00:20:47Z","html_url":"https://github.com/puppetlabs/puppet/pull/5233#discussion_r76348039","pull_request_url":"https://api.github.com/repos/puppetlabs/puppet/pulls/5233","_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/comments/76348039"},"html":{"href":"https://github.com/puppetlabs/puppet/pull/5233#discussion_r76348039"},"pull_request":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/5233"}}},"pull_request":{"url":"https://api.github.com/repos/puppetlabs/puppet/pulls/5233","id":82811981,"html_url":"https://github.com/puppetlabs/puppet/pull/5233","diff_url":"https://github.com/puppetlabs/puppet/pull/5233.diff","patch_url":"https://github.com/puppetlabs/puppet/pull/5233.patch","issue_url":"https://api.github.com/repos/puppetlabs/puppet/issues/5233","number":5233,"state":"open","locked":false,"title":"(PUP-6629) Respect the passed log level when log_exception is passed a custom message","user":{"login":"branan","id":37594,"avatar_url":"https://avatars.githubusercontent.com/u/37594?v=3","gravatar_id":"","url":"https://api.github.com/users/branan","html_url":"https://github.com/branan","followers_url":"https://api.github.com/users/branan/followers","following_url":"https://api.github.com/users/branan/following{/other_user}","gists_url":"https://api.github.com/users/branan/gists{/gist_id}","starred_url":"https://api.github.com/users/branan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/branan/subscriptions","organizations_url":"https://api.github.com/users/branan/orgs","repos_url":"https://api.github.com/users/branan/repos","events_url":"https://api.github.com/users/branan/events{/privacy}","received_events_url":"https://api.github.com/users/branan/received_events","type":"User","site_admin":false},"body":"The first time we tried to fix PUP-6629, we did not fix all the code\r\npaths in log_exception - specifically, when a custom message was\r\npassed (which insync_values? does), we still logged at error level.\r\n\r\nThis now handles that case, and also adds a test for insync_values? to\r\nensure it does not log at error level if insync? fails.","created_at":"2016-08-25T23:47:05Z","updated_at":"2016-08-26T00:20:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f5f89367c6cb94c341273090f427b5762add408b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/puppetlabs/puppet/pulls/5233/commits","review_comments_url":"https://api.github.com/repos/puppetlabs/puppet/pulls/5233/comments","review_comment_url":"https://api.github.com/repos/puppetlabs/puppet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/puppetlabs/puppet/issues/5233/comments","statuses_url":"https://api.github.com/repos/puppetlabs/puppet/statuses/678262f7bea7edd9dccbdfe8f7948b744a0260e6","head":{"label":"branan:pup-6629-take-2","ref":"pup-6629-take-2","sha":"678262f7bea7edd9dccbdfe8f7948b744a0260e6","user":{"login":"branan","id":37594,"avatar_url":"https://avatars.githubusercontent.com/u/37594?v=3","gravatar_id":"","url":"https://api.github.com/users/branan","html_url":"https://github.com/branan","followers_url":"https://api.github.com/users/branan/followers","following_url":"https://api.github.com/users/branan/following{/other_user}","gists_url":"https://api.github.com/users/branan/gists{/gist_id}","starred_url":"https://api.github.com/users/branan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/branan/subscriptions","organizations_url":"https://api.github.com/users/branan/orgs","repos_url":"https://api.github.com/users/branan/repos","events_url":"https://api.github.com/users/branan/events{/privacy}","received_events_url":"https://api.github.com/users/branan/received_events","type":"User","site_admin":false},"repo":{"id":5719668,"name":"puppet","full_name":"branan/puppet","owner":{"login":"branan","id":37594,"avatar_url":"https://avatars.githubusercontent.com/u/37594?v=3","gravatar_id":"","url":"https://api.github.com/users/branan","html_url":"https://github.com/branan","followers_url":"https://api.github.com/users/branan/followers","following_url":"https://api.github.com/users/branan/following{/other_user}","gists_url":"https://api.github.com/users/branan/gists{/gist_id}","starred_url":"https://api.github.com/users/branan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/branan/subscriptions","organizations_url":"https://api.github.com/users/branan/orgs","repos_url":"https://api.github.com/users/branan/repos","events_url":"https://api.github.com/users/branan/events{/privacy}","received_events_url":"https://api.github.com/users/branan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/branan/puppet","description":"Server automation framework and application","fork":true,"url":"https://api.github.com/repos/branan/puppet","forks_url":"https://api.github.com/repos/branan/puppet/forks","keys_url":"https://api.github.com/repos/branan/puppet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/branan/puppet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/branan/puppet/teams","hooks_url":"https://api.github.com/repos/branan/puppet/hooks","issue_events_url":"https://api.github.com/repos/branan/puppet/issues/events{/number}","events_url":"https://api.github.com/repos/branan/puppet/events","assignees_url":"https://api.github.com/repos/branan/puppet/assignees{/user}","branches_url":"https://api.github.com/repos/branan/puppet/branches{/branch}","tags_url":"https://api.github.com/repos/branan/puppet/tags","blobs_url":"https://api.github.com/repos/branan/puppet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/branan/puppet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/branan/puppet/git/refs{/sha}","trees_url":"https://api.github.com/repos/branan/puppet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/branan/puppet/statuses/{sha}","languages_url":"https://api.github.com/repos/branan/puppet/languages","stargazers_url":"https://api.github.com/repos/branan/puppet/stargazers","contributors_url":"https://api.github.com/repos/branan/puppet/contributors","subscribers_url":"https://api.github.com/repos/branan/puppet/subscribers","subscription_url":"https://api.github.com/repos/branan/puppet/subscription","commits_url":"https://api.github.com/repos/branan/puppet/commits{/sha}","git_commits_url":"https://api.github.com/repos/branan/puppet/git/commits{/sha}","comments_url":"https://api.github.com/repos/branan/puppet/comments{/number}","issue_comment_url":"https://api.github.com/repos/branan/puppet/issues/comments{/number}","contents_url":"https://api.github.com/repos/branan/puppet/contents/{+path}","compare_url":"https://api.github.com/repos/branan/puppet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/branan/puppet/merges","archive_url":"https://api.github.com/repos/branan/puppet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/branan/puppet/downloads","issues_url":"https://api.github.com/repos/branan/puppet/issues{/number}","pulls_url":"https://api.github.com/repos/branan/puppet/pulls{/number}","milestones_url":"https://api.github.com/repos/branan/puppet/milestones{/number}","notifications_url":"https://api.github.com/repos/branan/puppet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/branan/puppet/labels{/name}","releases_url":"https://api.github.com/repos/branan/puppet/releases{/id}","deployments_url":"https://api.github.com/repos/branan/puppet/deployments","created_at":"2012-09-07T16:54:25Z","updated_at":"2015-04-02T22:11:41Z","pushed_at":"2016-08-25T23:46:34Z","git_url":"git://github.com/branan/puppet.git","ssh_url":"git@github.com:branan/puppet.git","clone_url":"https://github.com/branan/puppet.git","svn_url":"https://github.com/branan/puppet","homepage":"http://www.puppetlabs.com/puppet/introduction/","size":53922,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"puppetlabs:stable","ref":"stable","sha":"0a4609f9a03ad6bbb0720b8f8455e81a164b072d","user":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=3","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":910744,"name":"puppet","full_name":"puppetlabs/puppet","owner":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=3","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/puppetlabs/puppet","description":"Server automation framework and application","fork":false,"url":"https://api.github.com/repos/puppetlabs/puppet","forks_url":"https://api.github.com/repos/puppetlabs/puppet/forks","keys_url":"https://api.github.com/repos/puppetlabs/puppet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/puppetlabs/puppet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/puppetlabs/puppet/teams","hooks_url":"https://api.github.com/repos/puppetlabs/puppet/hooks","issue_events_url":"https://api.github.com/repos/puppetlabs/puppet/issues/events{/number}","events_url":"https://api.github.com/repos/puppetlabs/puppet/events","assignees_url":"https://api.github.com/repos/puppetlabs/puppet/assignees{/user}","branches_url":"https://api.github.com/repos/puppetlabs/puppet/branches{/branch}","tags_url":"https://api.github.com/repos/puppetlabs/puppet/tags","blobs_url":"https://api.github.com/repos/puppetlabs/puppet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/puppetlabs/puppet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/puppetlabs/puppet/git/refs{/sha}","trees_url":"https://api.github.com/repos/puppetlabs/puppet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/puppetlabs/puppet/statuses/{sha}","languages_url":"https://api.github.com/repos/puppetlabs/puppet/languages","stargazers_url":"https://api.github.com/repos/puppetlabs/puppet/stargazers","contributors_url":"https://api.github.com/repos/puppetlabs/puppet/contributors","subscribers_url":"https://api.github.com/repos/puppetlabs/puppet/subscribers","subscription_url":"https://api.github.com/repos/puppetlabs/puppet/subscription","commits_url":"https://api.github.com/repos/puppetlabs/puppet/commits{/sha}","git_commits_url":"https://api.github.com/repos/puppetlabs/puppet/git/commits{/sha}","comments_url":"https://api.github.com/repos/puppetlabs/puppet/comments{/number}","issue_comment_url":"https://api.github.com/repos/puppetlabs/puppet/issues/comments{/number}","contents_url":"https://api.github.com/repos/puppetlabs/puppet/contents/{+path}","compare_url":"https://api.github.com/repos/puppetlabs/puppet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/puppetlabs/puppet/merges","archive_url":"https://api.github.com/repos/puppetlabs/puppet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/puppetlabs/puppet/downloads","issues_url":"https://api.github.com/repos/puppetlabs/puppet/issues{/number}","pulls_url":"https://api.github.com/repos/puppetlabs/puppet/pulls{/number}","milestones_url":"https://api.github.com/repos/puppetlabs/puppet/milestones{/number}","notifications_url":"https://api.github.com/repos/puppetlabs/puppet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/puppetlabs/puppet/labels{/name}","releases_url":"https://api.github.com/repos/puppetlabs/puppet/releases{/id}","deployments_url":"https://api.github.com/repos/puppetlabs/puppet/deployments","created_at":"2010-09-14T19:26:44Z","updated_at":"2016-08-26T00:04:07Z","pushed_at":"2016-08-25T23:47:09Z","git_url":"git://github.com/puppetlabs/puppet.git","ssh_url":"git@github.com:puppetlabs/puppet.git","clone_url":"https://github.com/puppetlabs/puppet.git","svn_url":"https://github.com/puppetlabs/puppet","homepage":"https://puppet.com/puppet/what-is-puppet","size":82119,"stargazers_count":4124,"watchers_count":4124,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1699,"mirror_url":null,"open_issues_count":60,"forks":1699,"open_issues":60,"watchers":4124,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/5233"},"html":{"href":"https://github.com/puppetlabs/puppet/pull/5233"},"issue":{"href":"https://api.github.com/repos/puppetlabs/puppet/issues/5233"},"comments":{"href":"https://api.github.com/repos/puppetlabs/puppet/issues/5233/comments"},"review_comments":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/5233/comments"},"review_comment":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/5233/commits"},"statuses":{"href":"https://api.github.com/repos/puppetlabs/puppet/statuses/678262f7bea7edd9dccbdfe8f7948b744a0260e6"}}}}
{"actor":{"display_login":"Iristyle"}}