{"action":"created","comment":{"url":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/pulls/comments/78846365","id":78846365,"diff_hunk":"@@ -0,0 +1,22 @@\n+(ns puppetlabs.trapperkeeper.services.status.status-logging\n+  (:require [clojure.tools.logging :as log]\n+            [schema.core :as schema]\n+            [schema.utils :refer [validation-error-explain]]\n+            [cheshire.core :as json]\n+            [puppetlabs.trapperkeeper.services.status.status-core :as status-core])\n+  (:import (clojure.lang IFn)\n+           (java.util.concurrent Future)))\n+\n+(schema/defn start-background-task :- Future\n+  \"Creates a future which calls callback every frequency milliseconds\"\n+  [frequency :- schema/Int\n+   callback :- IFn]\n+  (future (while true\n+            (callback)\n+            (Thread/sleep frequency))))\n+\n+(defn logging-fn\n+  \"Log status information at the debug level as json\"\n+  []\n+  (let [status (status-core/v1-status :debug)]","path":"src/puppetlabs/trapperkeeper/services/status/status_logging.clj","position":21,"original_position":21,"commit_id":"faac0f4e8c83fa1177db312130d42d40e57f6e7f","original_commit_id":"faac0f4e8c83fa1177db312130d42d40e57f6e7f","user":{"login":"jpinsonault","id":137581,"avatar_url":"https://avatars.githubusercontent.com/u/137581?v=3","gravatar_id":"","url":"https://api.github.com/users/jpinsonault","html_url":"https://github.com/jpinsonault","followers_url":"https://api.github.com/users/jpinsonault/followers","following_url":"https://api.github.com/users/jpinsonault/following{/other_user}","gists_url":"https://api.github.com/users/jpinsonault/gists{/gist_id}","starred_url":"https://api.github.com/users/jpinsonault/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpinsonault/subscriptions","organizations_url":"https://api.github.com/users/jpinsonault/orgs","repos_url":"https://api.github.com/users/jpinsonault/repos","events_url":"https://api.github.com/users/jpinsonault/events{/privacy}","received_events_url":"https://api.github.com/users/jpinsonault/received_events","type":"User","site_admin":false},"body":"I believe that's correct, that we wouldn't see them. I'll test it out though. Yeah it probably makes more sense to log them at `debug`","created_at":"2016-09-14T21:32:30Z","updated_at":"2016-09-14T21:32:30Z","html_url":"https://github.com/puppetlabs/trapperkeeper-status/pull/58#discussion_r78846365","pull_request_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/pulls/58","_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/pulls/comments/78846365"},"html":{"href":"https://github.com/puppetlabs/trapperkeeper-status/pull/58#discussion_r78846365"},"pull_request":{"href":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/pulls/58"}}},"pull_request":{"url":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/pulls/58","id":85143459,"html_url":"https://github.com/puppetlabs/trapperkeeper-status/pull/58","diff_url":"https://github.com/puppetlabs/trapperkeeper-status/pull/58.diff","patch_url":"https://github.com/puppetlabs/trapperkeeper-status/pull/58.patch","issue_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/issues/58","number":58,"state":"open","locked":false,"title":"[WIP] (TK-400) Add setting to log status data periodically","user":{"login":"jpinsonault","id":137581,"avatar_url":"https://avatars.githubusercontent.com/u/137581?v=3","gravatar_id":"","url":"https://api.github.com/users/jpinsonault","html_url":"https://github.com/jpinsonault","followers_url":"https://api.github.com/users/jpinsonault/followers","following_url":"https://api.github.com/users/jpinsonault/following{/other_user}","gists_url":"https://api.github.com/users/jpinsonault/gists{/gist_id}","starred_url":"https://api.github.com/users/jpinsonault/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpinsonault/subscriptions","organizations_url":"https://api.github.com/users/jpinsonault/orgs","repos_url":"https://api.github.com/users/jpinsonault/repos","events_url":"https://api.github.com/users/jpinsonault/events{/privacy}","received_events_url":"https://api.github.com/users/jpinsonault/received_events","type":"User","site_admin":false},"body":"This commit adds functionality to periodically log status endpoint data\r\nto a file.\r\n\r\nIt logs directly through logback, so a corresponding logger must be created in\r\nwhatever project is consuming tk-status, otherwise it will clutter up the main\r\nlog files","created_at":"2016-09-13T23:25:51Z","updated_at":"2016-09-14T21:32:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"82731c946042a717eb8c6d6e2cb02cc310013be8","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/pulls/58/commits","review_comments_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/pulls/58/comments","review_comment_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/pulls/comments{/number}","comments_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/issues/58/comments","statuses_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/statuses/faac0f4e8c83fa1177db312130d42d40e57f6e7f","head":{"label":"jpinsonault:tk-400-log-status-data","ref":"tk-400-log-status-data","sha":"faac0f4e8c83fa1177db312130d42d40e57f6e7f","user":{"login":"jpinsonault","id":137581,"avatar_url":"https://avatars.githubusercontent.com/u/137581?v=3","gravatar_id":"","url":"https://api.github.com/users/jpinsonault","html_url":"https://github.com/jpinsonault","followers_url":"https://api.github.com/users/jpinsonault/followers","following_url":"https://api.github.com/users/jpinsonault/following{/other_user}","gists_url":"https://api.github.com/users/jpinsonault/gists{/gist_id}","starred_url":"https://api.github.com/users/jpinsonault/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpinsonault/subscriptions","organizations_url":"https://api.github.com/users/jpinsonault/orgs","repos_url":"https://api.github.com/users/jpinsonault/repos","events_url":"https://api.github.com/users/jpinsonault/events{/privacy}","received_events_url":"https://api.github.com/users/jpinsonault/received_events","type":"User","site_admin":false},"repo":{"id":37346569,"name":"trapperkeeper-status","full_name":"jpinsonault/trapperkeeper-status","owner":{"login":"jpinsonault","id":137581,"avatar_url":"https://avatars.githubusercontent.com/u/137581?v=3","gravatar_id":"","url":"https://api.github.com/users/jpinsonault","html_url":"https://github.com/jpinsonault","followers_url":"https://api.github.com/users/jpinsonault/followers","following_url":"https://api.github.com/users/jpinsonault/following{/other_user}","gists_url":"https://api.github.com/users/jpinsonault/gists{/gist_id}","starred_url":"https://api.github.com/users/jpinsonault/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpinsonault/subscriptions","organizations_url":"https://api.github.com/users/jpinsonault/orgs","repos_url":"https://api.github.com/users/jpinsonault/repos","events_url":"https://api.github.com/users/jpinsonault/events{/privacy}","received_events_url":"https://api.github.com/users/jpinsonault/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jpinsonault/trapperkeeper-status","description":"Trapperkeeper Status Service","fork":true,"url":"https://api.github.com/repos/jpinsonault/trapperkeeper-status","forks_url":"https://api.github.com/repos/jpinsonault/trapperkeeper-status/forks","keys_url":"https://api.github.com/repos/jpinsonault/trapperkeeper-status/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jpinsonault/trapperkeeper-status/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jpinsonault/trapperkeeper-status/teams","hooks_url":"https://api.github.com/repos/jpinsonault/trapperkeeper-status/hooks","issue_events_url":"https://api.github.com/repos/jpinsonault/trapperkeeper-status/issues/events{/number}","events_url":"https://api.github.com/repos/jpinsonault/trapperkeeper-status/events","assignees_url":"https://api.github.com/repos/jpinsonault/trapperkeeper-status/assignees{/user}","branches_url":"https://api.github.com/repos/jpinsonault/trapperkeeper-status/branches{/branch}","tags_url":"https://api.github.com/repos/jpinsonault/trapperkeeper-status/tags","blobs_url":"https://api.github.com/repos/jpinsonault/trapperkeeper-status/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jpinsonault/trapperkeeper-status/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jpinsonault/trapperkeeper-status/git/refs{/sha}","trees_url":"https://api.github.com/repos/jpinsonault/trapperkeeper-status/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jpinsonault/trapperkeeper-status/statuses/{sha}","languages_url":"https://api.github.com/repos/jpinsonault/trapperkeeper-status/languages","stargazers_url":"https://api.github.com/repos/jpinsonault/trapperkeeper-status/stargazers","contributors_url":"https://api.github.com/repos/jpinsonault/trapperkeeper-status/contributors","subscribers_url":"https://api.github.com/repos/jpinsonault/trapperkeeper-status/subscribers","subscription_url":"https://api.github.com/repos/jpinsonault/trapperkeeper-status/subscription","commits_url":"https://api.github.com/repos/jpinsonault/trapperkeeper-status/commits{/sha}","git_commits_url":"https://api.github.com/repos/jpinsonault/trapperkeeper-status/git/commits{/sha}","comments_url":"https://api.github.com/repos/jpinsonault/trapperkeeper-status/comments{/number}","issue_comment_url":"https://api.github.com/repos/jpinsonault/trapperkeeper-status/issues/comments{/number}","contents_url":"https://api.github.com/repos/jpinsonault/trapperkeeper-status/contents/{+path}","compare_url":"https://api.github.com/repos/jpinsonault/trapperkeeper-status/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jpinsonault/trapperkeeper-status/merges","archive_url":"https://api.github.com/repos/jpinsonault/trapperkeeper-status/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jpinsonault/trapperkeeper-status/downloads","issues_url":"https://api.github.com/repos/jpinsonault/trapperkeeper-status/issues{/number}","pulls_url":"https://api.github.com/repos/jpinsonault/trapperkeeper-status/pulls{/number}","milestones_url":"https://api.github.com/repos/jpinsonault/trapperkeeper-status/milestones{/number}","notifications_url":"https://api.github.com/repos/jpinsonault/trapperkeeper-status/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jpinsonault/trapperkeeper-status/labels{/name}","releases_url":"https://api.github.com/repos/jpinsonault/trapperkeeper-status/releases{/id}","deployments_url":"https://api.github.com/repos/jpinsonault/trapperkeeper-status/deployments","created_at":"2015-06-12T21:59:12Z","updated_at":"2015-06-12T21:59:12Z","pushed_at":"2016-09-13T18:25:48Z","git_url":"git://github.com/jpinsonault/trapperkeeper-status.git","ssh_url":"git@github.com:jpinsonault/trapperkeeper-status.git","clone_url":"https://github.com/jpinsonault/trapperkeeper-status.git","svn_url":"https://github.com/jpinsonault/trapperkeeper-status","homepage":null,"size":244,"stargazers_count":0,"watchers_count":0,"language":"Clojure","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":"puppetlabs:master","ref":"master","sha":"94a66e36aa0ac4df11c1eae5a6bcd6cc118ba9b5","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":33000992,"name":"trapperkeeper-status","full_name":"puppetlabs/trapperkeeper-status","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/trapperkeeper-status","description":"Trapperkeeper Status Service","fork":false,"url":"https://api.github.com/repos/puppetlabs/trapperkeeper-status","forks_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/forks","keys_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/keys{/key_id}","collaborators_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/teams","hooks_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/hooks","issue_events_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/issues/events{/number}","events_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/events","assignees_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/assignees{/user}","branches_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/branches{/branch}","tags_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/tags","blobs_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/git/refs{/sha}","trees_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/git/trees{/sha}","statuses_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/statuses/{sha}","languages_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/languages","stargazers_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/stargazers","contributors_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/contributors","subscribers_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/subscribers","subscription_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/subscription","commits_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/commits{/sha}","git_commits_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/git/commits{/sha}","comments_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/comments{/number}","issue_comment_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/issues/comments{/number}","contents_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/contents/{+path}","compare_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/compare/{base}...{head}","merges_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/merges","archive_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/downloads","issues_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/issues{/number}","pulls_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/pulls{/number}","milestones_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/milestones{/number}","notifications_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/labels{/name}","releases_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/releases{/id}","deployments_url":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/deployments","created_at":"2015-03-27T17:54:03Z","updated_at":"2016-01-26T22:16:07Z","pushed_at":"2016-09-13T23:25:51Z","git_url":"git://github.com/puppetlabs/trapperkeeper-status.git","ssh_url":"git@github.com:puppetlabs/trapperkeeper-status.git","clone_url":"https://github.com/puppetlabs/trapperkeeper-status.git","svn_url":"https://github.com/puppetlabs/trapperkeeper-status","homepage":null,"size":276,"stargazers_count":3,"watchers_count":3,"language":"Clojure","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":1,"forks":13,"open_issues":1,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/pulls/58"},"html":{"href":"https://github.com/puppetlabs/trapperkeeper-status/pull/58"},"issue":{"href":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/issues/58"},"comments":{"href":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/issues/58/comments"},"review_comments":{"href":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/pulls/58/comments"},"review_comment":{"href":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/pulls/58/commits"},"statuses":{"href":"https://api.github.com/repos/puppetlabs/trapperkeeper-status/statuses/faac0f4e8c83fa1177db312130d42d40e57f6e7f"}}}}
{"actor":{"display_login":"jpinsonault"}}