{"action":"created","comment":{"url":"https://api.github.com/repos/puppetlabs/facter/pulls/comments/35709615","id":35709615,"diff_hunk":"@@ -264,6 +264,9 @@ int main(int argc, char **argv)\n         bool show_legacy = vm.count(\"show-legacy\");\n         facts.write(boost::nowide::cout, fmt, queries, show_legacy);\n         boost::nowide::cout << endl;\n+    } catch (locale_error const& e) {\n+        cerr << \"Failed to initialize logging system due to a locale error: \" << e.what() << endl;","path":"exe/facter.cc","position":5,"original_position":5,"commit_id":"3149a826579fcb2143603019a852e8030c11c3b0","original_commit_id":"3149a826579fcb2143603019a852e8030c11c3b0","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":"I'm not sure if we can use nowide at this point, since our locale is potentially hosed. colorize ought to work, though","created_at":"2015-07-28T22:31:47Z","updated_at":"2015-07-28T22:31:47Z","html_url":"https://github.com/puppetlabs/facter/pull/1054#discussion_r35709615","pull_request_url":"https://api.github.com/repos/puppetlabs/facter/pulls/1054","_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/facter/pulls/comments/35709615"},"html":{"href":"https://github.com/puppetlabs/facter/pull/1054#discussion_r35709615"},"pull_request":{"href":"https://api.github.com/repos/puppetlabs/facter/pulls/1054"}}},"pull_request":{"url":"https://api.github.com/repos/puppetlabs/facter/pulls/1054","id":39971032,"html_url":"https://github.com/puppetlabs/facter/pull/1054","diff_url":"https://github.com/puppetlabs/facter/pull/1054.diff","patch_url":"https://github.com/puppetlabs/facter/pull/1054.patch","issue_url":"https://api.github.com/repos/puppetlabs/facter/issues/1054","number":1054,"state":"open","locked":false,"title":"(FACT-1123) Retry locale setup with LANG=C when we fail","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":"Previously, if we failed to setup a locale (for any reason) we would fail hard. With this PR, we now clear the locale-related environment and try again, printing a warning message to the user.\r\n\r\nIf this second attempt fails, we'll still fail hard. We have no logging if our locale setup has failed, so there's not a lot we can do.\r\n\r\nThis also fixes a bug in the ruby module where it was initializing logging incorrectly.","created_at":"2015-07-14T22:38:52Z","updated_at":"2015-07-28T22:31:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d909ffcde6dc24dad73c819b274b7042d8f2ffc0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/puppetlabs/facter/pulls/1054/commits","review_comments_url":"https://api.github.com/repos/puppetlabs/facter/pulls/1054/comments","review_comment_url":"https://api.github.com/repos/puppetlabs/facter/pulls/comments{/number}","comments_url":"https://api.github.com/repos/puppetlabs/facter/issues/1054/comments","statuses_url":"https://api.github.com/repos/puppetlabs/facter/statuses/3149a826579fcb2143603019a852e8030c11c3b0","head":{"label":"branan:bug/stable/fact-1123-locale-retry","ref":"bug/stable/fact-1123-locale-retry","sha":"3149a826579fcb2143603019a852e8030c11c3b0","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":14342682,"name":"facter","full_name":"branan/facter","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/facter","description":"","fork":true,"url":"https://api.github.com/repos/branan/facter","forks_url":"https://api.github.com/repos/branan/facter/forks","keys_url":"https://api.github.com/repos/branan/facter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/branan/facter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/branan/facter/teams","hooks_url":"https://api.github.com/repos/branan/facter/hooks","issue_events_url":"https://api.github.com/repos/branan/facter/issues/events{/number}","events_url":"https://api.github.com/repos/branan/facter/events","assignees_url":"https://api.github.com/repos/branan/facter/assignees{/user}","branches_url":"https://api.github.com/repos/branan/facter/branches{/branch}","tags_url":"https://api.github.com/repos/branan/facter/tags","blobs_url":"https://api.github.com/repos/branan/facter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/branan/facter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/branan/facter/git/refs{/sha}","trees_url":"https://api.github.com/repos/branan/facter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/branan/facter/statuses/{sha}","languages_url":"https://api.github.com/repos/branan/facter/languages","stargazers_url":"https://api.github.com/repos/branan/facter/stargazers","contributors_url":"https://api.github.com/repos/branan/facter/contributors","subscribers_url":"https://api.github.com/repos/branan/facter/subscribers","subscription_url":"https://api.github.com/repos/branan/facter/subscription","commits_url":"https://api.github.com/repos/branan/facter/commits{/sha}","git_commits_url":"https://api.github.com/repos/branan/facter/git/commits{/sha}","comments_url":"https://api.github.com/repos/branan/facter/comments{/number}","issue_comment_url":"https://api.github.com/repos/branan/facter/issues/comments{/number}","contents_url":"https://api.github.com/repos/branan/facter/contents/{+path}","compare_url":"https://api.github.com/repos/branan/facter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/branan/facter/merges","archive_url":"https://api.github.com/repos/branan/facter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/branan/facter/downloads","issues_url":"https://api.github.com/repos/branan/facter/issues{/number}","pulls_url":"https://api.github.com/repos/branan/facter/pulls{/number}","milestones_url":"https://api.github.com/repos/branan/facter/milestones{/number}","notifications_url":"https://api.github.com/repos/branan/facter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/branan/facter/labels{/name}","releases_url":"https://api.github.com/repos/branan/facter/releases{/id}","created_at":"2013-11-12T19:25:37Z","updated_at":"2014-06-11T18:23:05Z","pushed_at":"2015-07-28T22:26:53Z","git_url":"git://github.com/branan/facter.git","ssh_url":"git@github.com:branan/facter.git","clone_url":"https://github.com/branan/facter.git","svn_url":"https://github.com/branan/facter","homepage":"http://projects.puppetlabs.com/projects/facter","size":11386,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"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":"49b691982a8c2063352c5ae2fe7e3f37d9586e4d","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":910757,"name":"facter","full_name":"puppetlabs/facter","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/facter","description":"Collect and display system facts","fork":false,"url":"https://api.github.com/repos/puppetlabs/facter","forks_url":"https://api.github.com/repos/puppetlabs/facter/forks","keys_url":"https://api.github.com/repos/puppetlabs/facter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/puppetlabs/facter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/puppetlabs/facter/teams","hooks_url":"https://api.github.com/repos/puppetlabs/facter/hooks","issue_events_url":"https://api.github.com/repos/puppetlabs/facter/issues/events{/number}","events_url":"https://api.github.com/repos/puppetlabs/facter/events","assignees_url":"https://api.github.com/repos/puppetlabs/facter/assignees{/user}","branches_url":"https://api.github.com/repos/puppetlabs/facter/branches{/branch}","tags_url":"https://api.github.com/repos/puppetlabs/facter/tags","blobs_url":"https://api.github.com/repos/puppetlabs/facter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/puppetlabs/facter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/puppetlabs/facter/git/refs{/sha}","trees_url":"https://api.github.com/repos/puppetlabs/facter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/puppetlabs/facter/statuses/{sha}","languages_url":"https://api.github.com/repos/puppetlabs/facter/languages","stargazers_url":"https://api.github.com/repos/puppetlabs/facter/stargazers","contributors_url":"https://api.github.com/repos/puppetlabs/facter/contributors","subscribers_url":"https://api.github.com/repos/puppetlabs/facter/subscribers","subscription_url":"https://api.github.com/repos/puppetlabs/facter/subscription","commits_url":"https://api.github.com/repos/puppetlabs/facter/commits{/sha}","git_commits_url":"https://api.github.com/repos/puppetlabs/facter/git/commits{/sha}","comments_url":"https://api.github.com/repos/puppetlabs/facter/comments{/number}","issue_comment_url":"https://api.github.com/repos/puppetlabs/facter/issues/comments{/number}","contents_url":"https://api.github.com/repos/puppetlabs/facter/contents/{+path}","compare_url":"https://api.github.com/repos/puppetlabs/facter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/puppetlabs/facter/merges","archive_url":"https://api.github.com/repos/puppetlabs/facter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/puppetlabs/facter/downloads","issues_url":"https://api.github.com/repos/puppetlabs/facter/issues{/number}","pulls_url":"https://api.github.com/repos/puppetlabs/facter/pulls{/number}","milestones_url":"https://api.github.com/repos/puppetlabs/facter/milestones{/number}","notifications_url":"https://api.github.com/repos/puppetlabs/facter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/puppetlabs/facter/labels{/name}","releases_url":"https://api.github.com/repos/puppetlabs/facter/releases{/id}","created_at":"2010-09-14T19:31:04Z","updated_at":"2015-07-25T20:57:25Z","pushed_at":"2015-07-28T22:29:45Z","git_url":"git://github.com/puppetlabs/facter.git","ssh_url":"git@github.com:puppetlabs/facter.git","clone_url":"https://github.com/puppetlabs/facter.git","svn_url":"https://github.com/puppetlabs/facter","homepage":"https://tickets.puppetlabs.com/browse/FACT","size":22272,"stargazers_count":385,"watchers_count":385,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":364,"mirror_url":null,"open_issues_count":10,"forks":364,"open_issues":10,"watchers":385,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/facter/pulls/1054"},"html":{"href":"https://github.com/puppetlabs/facter/pull/1054"},"issue":{"href":"https://api.github.com/repos/puppetlabs/facter/issues/1054"},"comments":{"href":"https://api.github.com/repos/puppetlabs/facter/issues/1054/comments"},"review_comments":{"href":"https://api.github.com/repos/puppetlabs/facter/pulls/1054/comments"},"review_comment":{"href":"https://api.github.com/repos/puppetlabs/facter/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/puppetlabs/facter/pulls/1054/commits"},"statuses":{"href":"https://api.github.com/repos/puppetlabs/facter/statuses/3149a826579fcb2143603019a852e8030c11c3b0"}}}}