{"action":"created","comment":{"url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls/comments/42909816","id":42909816,"diff_hunk":"@@ -14,22 +14,22 @@ def load_settings\n   end\n \n   def reload_settings\n-    settings_hash = CalcentralConfig.load_settings\n-    old_level = Rails.logger.level\n-    new_level = (settings_hash && settings_hash.logger && settings_hash.logger.level)\n-    valid = !new_level.nil? &&\n-      new_level != old_level &&\n-      new_level.is_a?(Integer) &&\n-      (0...Log4r::LNAMES.length).include?(new_level)\n-    if valid\n-      old_level_name = Log4r::LNAMES[old_level]\n-      new_level_name = Log4r::LNAMES[new_level]\n-      Rails.logger.level = new_level\n-      Rails.logger.warn \"Rails.logger.level changed (old -> new): #{old_level_name} -> #{new_level_name}\"\n-    else\n-      Rails.logger.warn \"Do nothing. Log levels have not changed (old -> new): #{old_level} -> #{new_level}\"\n+    if Kernel.const_defined? :Settings\n+      new_settings = load_settings\n+      Rails.logger.warn 'Preparing to reload application settings via Kernel'\n+      Kernel.const_set(:Settings, new_settings)\n+      new_level = Log4r::LNAMES.index Settings.logger.level\n+      old_level = Rails.logger.level\n+      if new_level.nil?\n+        Rails.logger.warn \"The new logger level is invalid: #{Settings.logger.level}\"\n+      elsif new_level == old_level\n+        Rails.logger.warn \"No change to logger level: #{Log4r::LNAMES[Rails.logger.level]}\"\n+      else\n+        Rails.logger.level = new_level\n+        Rails.logger.warn \"Logger level changed (old -> new): #{Log4r::LNAMES[old_level]} -> #{Log4r::LNAMES[Rails.logger.level]}\"\n+      end","path":"lib/calcentral_config.rb","position":31,"original_position":31,"commit_id":"6d86536a7279131e1b5dd042eb395cc292b0d0a1","original_commit_id":"6d86536a7279131e1b5dd042eb395cc292b0d0a1","user":{"login":"paulkerschen","id":2413467,"avatar_url":"https://avatars.githubusercontent.com/u/2413467?v=3","gravatar_id":"","url":"https://api.github.com/users/paulkerschen","html_url":"https://github.com/paulkerschen","followers_url":"https://api.github.com/users/paulkerschen/followers","following_url":"https://api.github.com/users/paulkerschen/following{/other_user}","gists_url":"https://api.github.com/users/paulkerschen/gists{/gist_id}","starred_url":"https://api.github.com/users/paulkerschen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulkerschen/subscriptions","organizations_url":"https://api.github.com/users/paulkerschen/orgs","repos_url":"https://api.github.com/users/paulkerschen/repos","events_url":"https://api.github.com/users/paulkerschen/events{/privacy}","received_events_url":"https://api.github.com/users/paulkerschen/received_events","type":"User","site_admin":false},"body":"@johncrossman Makes sense; risk of misuse argues for private method in this module, not over in the logging module.","created_at":"2015-10-23T20:18:07Z","updated_at":"2015-10-23T20:18:07Z","html_url":"https://github.com/ets-berkeley-edu/calcentral/pull/4435#discussion_r42909816","pull_request_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls/4435","_links":{"self":{"href":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls/comments/42909816"},"html":{"href":"https://github.com/ets-berkeley-edu/calcentral/pull/4435#discussion_r42909816"},"pull_request":{"href":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls/4435"}}},"pull_request":{"url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls/4435","id":48622765,"html_url":"https://github.com/ets-berkeley-edu/calcentral/pull/4435","diff_url":"https://github.com/ets-berkeley-edu/calcentral/pull/4435.diff","patch_url":"https://github.com/ets-berkeley-edu/calcentral/pull/4435.patch","issue_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/issues/4435","number":4435,"state":"open","locked":false,"title":"CLC-5906, dynamically flip key configurations without redeploy/restart","user":{"login":"johncrossman","id":7606442,"avatar_url":"https://avatars.githubusercontent.com/u/7606442?v=3","gravatar_id":"","url":"https://api.github.com/users/johncrossman","html_url":"https://github.com/johncrossman","followers_url":"https://api.github.com/users/johncrossman/followers","following_url":"https://api.github.com/users/johncrossman/following{/other_user}","gists_url":"https://api.github.com/users/johncrossman/gists{/gist_id}","starred_url":"https://api.github.com/users/johncrossman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johncrossman/subscriptions","organizations_url":"https://api.github.com/users/johncrossman/orgs","repos_url":"https://api.github.com/users/johncrossman/repos","events_url":"https://api.github.com/users/johncrossman/events{/privacy}","received_events_url":"https://api.github.com/users/johncrossman/received_events","type":"User","site_admin":false},"body":"https://jira.ets.berkeley.edu/jira/browse/CLC-5906\r\n\r\nNote:\r\n* Code does before and after diff on feature flags (litmus test)\r\n* Message to the user guesses at success / failure. Ultimately, user must verify success with his/her own smoke-testing.\r\n* Overhauled the spec","created_at":"2015-10-23T19:53:45Z","updated_at":"2015-10-23T20:18:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aee4fabc813a6270fc7aaefd41a4ea2e1dab624c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls/4435/commits","review_comments_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls/4435/comments","review_comment_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/issues/4435/comments","statuses_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/statuses/6d86536a7279131e1b5dd042eb395cc292b0d0a1","head":{"label":"johncrossman:CLC-5906_reload-YAML","ref":"CLC-5906_reload-YAML","sha":"6d86536a7279131e1b5dd042eb395cc292b0d0a1","user":{"login":"johncrossman","id":7606442,"avatar_url":"https://avatars.githubusercontent.com/u/7606442?v=3","gravatar_id":"","url":"https://api.github.com/users/johncrossman","html_url":"https://github.com/johncrossman","followers_url":"https://api.github.com/users/johncrossman/followers","following_url":"https://api.github.com/users/johncrossman/following{/other_user}","gists_url":"https://api.github.com/users/johncrossman/gists{/gist_id}","starred_url":"https://api.github.com/users/johncrossman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johncrossman/subscriptions","organizations_url":"https://api.github.com/users/johncrossman/orgs","repos_url":"https://api.github.com/users/johncrossman/repos","events_url":"https://api.github.com/users/johncrossman/events{/privacy}","received_events_url":"https://api.github.com/users/johncrossman/received_events","type":"User","site_admin":false},"repo":{"id":23628046,"name":"calcentral","full_name":"johncrossman/calcentral","owner":{"login":"johncrossman","id":7606442,"avatar_url":"https://avatars.githubusercontent.com/u/7606442?v=3","gravatar_id":"","url":"https://api.github.com/users/johncrossman","html_url":"https://github.com/johncrossman","followers_url":"https://api.github.com/users/johncrossman/followers","following_url":"https://api.github.com/users/johncrossman/following{/other_user}","gists_url":"https://api.github.com/users/johncrossman/gists{/gist_id}","starred_url":"https://api.github.com/users/johncrossman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johncrossman/subscriptions","organizations_url":"https://api.github.com/users/johncrossman/orgs","repos_url":"https://api.github.com/users/johncrossman/repos","events_url":"https://api.github.com/users/johncrossman/events{/privacy}","received_events_url":"https://api.github.com/users/johncrossman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/johncrossman/calcentral","description":"","fork":true,"url":"https://api.github.com/repos/johncrossman/calcentral","forks_url":"https://api.github.com/repos/johncrossman/calcentral/forks","keys_url":"https://api.github.com/repos/johncrossman/calcentral/keys{/key_id}","collaborators_url":"https://api.github.com/repos/johncrossman/calcentral/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/johncrossman/calcentral/teams","hooks_url":"https://api.github.com/repos/johncrossman/calcentral/hooks","issue_events_url":"https://api.github.com/repos/johncrossman/calcentral/issues/events{/number}","events_url":"https://api.github.com/repos/johncrossman/calcentral/events","assignees_url":"https://api.github.com/repos/johncrossman/calcentral/assignees{/user}","branches_url":"https://api.github.com/repos/johncrossman/calcentral/branches{/branch}","tags_url":"https://api.github.com/repos/johncrossman/calcentral/tags","blobs_url":"https://api.github.com/repos/johncrossman/calcentral/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/johncrossman/calcentral/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/johncrossman/calcentral/git/refs{/sha}","trees_url":"https://api.github.com/repos/johncrossman/calcentral/git/trees{/sha}","statuses_url":"https://api.github.com/repos/johncrossman/calcentral/statuses/{sha}","languages_url":"https://api.github.com/repos/johncrossman/calcentral/languages","stargazers_url":"https://api.github.com/repos/johncrossman/calcentral/stargazers","contributors_url":"https://api.github.com/repos/johncrossman/calcentral/contributors","subscribers_url":"https://api.github.com/repos/johncrossman/calcentral/subscribers","subscription_url":"https://api.github.com/repos/johncrossman/calcentral/subscription","commits_url":"https://api.github.com/repos/johncrossman/calcentral/commits{/sha}","git_commits_url":"https://api.github.com/repos/johncrossman/calcentral/git/commits{/sha}","comments_url":"https://api.github.com/repos/johncrossman/calcentral/comments{/number}","issue_comment_url":"https://api.github.com/repos/johncrossman/calcentral/issues/comments{/number}","contents_url":"https://api.github.com/repos/johncrossman/calcentral/contents/{+path}","compare_url":"https://api.github.com/repos/johncrossman/calcentral/compare/{base}...{head}","merges_url":"https://api.github.com/repos/johncrossman/calcentral/merges","archive_url":"https://api.github.com/repos/johncrossman/calcentral/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/johncrossman/calcentral/downloads","issues_url":"https://api.github.com/repos/johncrossman/calcentral/issues{/number}","pulls_url":"https://api.github.com/repos/johncrossman/calcentral/pulls{/number}","milestones_url":"https://api.github.com/repos/johncrossman/calcentral/milestones{/number}","notifications_url":"https://api.github.com/repos/johncrossman/calcentral/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/johncrossman/calcentral/labels{/name}","releases_url":"https://api.github.com/repos/johncrossman/calcentral/releases{/id}","created_at":"2014-09-03T16:25:09Z","updated_at":"2015-05-07T16:57:25Z","pushed_at":"2015-10-23T20:03:17Z","git_url":"git://github.com/johncrossman/calcentral.git","ssh_url":"git@github.com:johncrossman/calcentral.git","clone_url":"https://github.com/johncrossman/calcentral.git","svn_url":"https://github.com/johncrossman/calcentral","homepage":"https://calcentral.berkeley.edu","size":22403,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"ets-berkeley-edu:master","ref":"master","sha":"1754007c9c433ccca121826582ee03e29861ece0","user":{"login":"ets-berkeley-edu","id":283538,"avatar_url":"https://avatars.githubusercontent.com/u/283538?v=3","gravatar_id":"","url":"https://api.github.com/users/ets-berkeley-edu","html_url":"https://github.com/ets-berkeley-edu","followers_url":"https://api.github.com/users/ets-berkeley-edu/followers","following_url":"https://api.github.com/users/ets-berkeley-edu/following{/other_user}","gists_url":"https://api.github.com/users/ets-berkeley-edu/gists{/gist_id}","starred_url":"https://api.github.com/users/ets-berkeley-edu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ets-berkeley-edu/subscriptions","organizations_url":"https://api.github.com/users/ets-berkeley-edu/orgs","repos_url":"https://api.github.com/users/ets-berkeley-edu/repos","events_url":"https://api.github.com/users/ets-berkeley-edu/events{/privacy}","received_events_url":"https://api.github.com/users/ets-berkeley-edu/received_events","type":"Organization","site_admin":false},"repo":{"id":5483921,"name":"calcentral","full_name":"ets-berkeley-edu/calcentral","owner":{"login":"ets-berkeley-edu","id":283538,"avatar_url":"https://avatars.githubusercontent.com/u/283538?v=3","gravatar_id":"","url":"https://api.github.com/users/ets-berkeley-edu","html_url":"https://github.com/ets-berkeley-edu","followers_url":"https://api.github.com/users/ets-berkeley-edu/followers","following_url":"https://api.github.com/users/ets-berkeley-edu/following{/other_user}","gists_url":"https://api.github.com/users/ets-berkeley-edu/gists{/gist_id}","starred_url":"https://api.github.com/users/ets-berkeley-edu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ets-berkeley-edu/subscriptions","organizations_url":"https://api.github.com/users/ets-berkeley-edu/orgs","repos_url":"https://api.github.com/users/ets-berkeley-edu/repos","events_url":"https://api.github.com/users/ets-berkeley-edu/events{/privacy}","received_events_url":"https://api.github.com/users/ets-berkeley-edu/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ets-berkeley-edu/calcentral","description":"","fork":false,"url":"https://api.github.com/repos/ets-berkeley-edu/calcentral","forks_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/forks","keys_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/teams","hooks_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/hooks","issue_events_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/issues/events{/number}","events_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/events","assignees_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/assignees{/user}","branches_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/branches{/branch}","tags_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/tags","blobs_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/git/refs{/sha}","trees_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/statuses/{sha}","languages_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/languages","stargazers_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/stargazers","contributors_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/contributors","subscribers_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/subscribers","subscription_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/subscription","commits_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/commits{/sha}","git_commits_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/git/commits{/sha}","comments_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/comments{/number}","issue_comment_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/issues/comments{/number}","contents_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/contents/{+path}","compare_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/merges","archive_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/downloads","issues_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/issues{/number}","pulls_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls{/number}","milestones_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/milestones{/number}","notifications_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/labels{/name}","releases_url":"https://api.github.com/repos/ets-berkeley-edu/calcentral/releases{/id}","created_at":"2012-08-20T16:45:39Z","updated_at":"2015-10-20T05:59:30Z","pushed_at":"2015-10-23T20:15:57Z","git_url":"git://github.com/ets-berkeley-edu/calcentral.git","ssh_url":"git@github.com:ets-berkeley-edu/calcentral.git","clone_url":"https://github.com/ets-berkeley-edu/calcentral.git","svn_url":"https://github.com/ets-berkeley-edu/calcentral","homepage":"https://calcentral.berkeley.edu","size":39101,"stargazers_count":50,"watchers_count":50,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":56,"mirror_url":null,"open_issues_count":3,"forks":56,"open_issues":3,"watchers":50,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls/4435"},"html":{"href":"https://github.com/ets-berkeley-edu/calcentral/pull/4435"},"issue":{"href":"https://api.github.com/repos/ets-berkeley-edu/calcentral/issues/4435"},"comments":{"href":"https://api.github.com/repos/ets-berkeley-edu/calcentral/issues/4435/comments"},"review_comments":{"href":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls/4435/comments"},"review_comment":{"href":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ets-berkeley-edu/calcentral/pulls/4435/commits"},"statuses":{"href":"https://api.github.com/repos/ets-berkeley-edu/calcentral/statuses/6d86536a7279131e1b5dd042eb395cc292b0d0a1"}}}}