{"action":"created","comment":{"url":"https://api.github.com/repos/heketi/heketi/pulls/comments/91685397","pull_request_review_id":12195704,"id":91685397,"diff_hunk":"@@ -74,6 +74,8 @@ func NewLogger(prefix string, level LogLevel) *Logger {\n \t\tl.level = level\n \t}\n \n+\tstdout, _ = os.OpenFile(\"/var/log/heketi/heketi.log\", os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0666)","path":"pkg/utils/log.go","position":4,"original_position":4,"commit_id":"8c3c03649ca62c9110e6ab17e2c8b2b248b00d87","original_commit_id":"1c4de7969728e15126c652d1fc262ae34e155927","user":{"login":"obnoxxx","id":8081179,"avatar_url":"https://avatars.githubusercontent.com/u/8081179?v=3","gravatar_id":"","url":"https://api.github.com/users/obnoxxx","html_url":"https://github.com/obnoxxx","followers_url":"https://api.github.com/users/obnoxxx/followers","following_url":"https://api.github.com/users/obnoxxx/following{/other_user}","gists_url":"https://api.github.com/users/obnoxxx/gists{/gist_id}","starred_url":"https://api.github.com/users/obnoxxx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/obnoxxx/subscriptions","organizations_url":"https://api.github.com/users/obnoxxx/orgs","repos_url":"https://api.github.com/users/obnoxxx/repos","events_url":"https://api.github.com/users/obnoxxx/events{/privacy}","received_events_url":"https://api.github.com/users/obnoxxx/received_events","type":"User","site_admin":false},"body":"@ramkrsna Logging to a file from a long-running service is not as easy as simply opening it for creation or appending and then writing to it: this way the log file will never get rotated and grow indefinitely. One usually needs some kind of signal handler to reopen the file (e.g on USR2). This way a logrotate system can work.\r\n\r\nLogging to stderr/stdout or syslog circumvents these complications.","created_at":"2016-12-09T09:46:59Z","updated_at":"2016-12-09T09:47:03Z","html_url":"https://github.com/heketi/heketi/pull/620#discussion_r91685397","pull_request_url":"https://api.github.com/repos/heketi/heketi/pulls/620","_links":{"self":{"href":"https://api.github.com/repos/heketi/heketi/pulls/comments/91685397"},"html":{"href":"https://github.com/heketi/heketi/pull/620#discussion_r91685397"},"pull_request":{"href":"https://api.github.com/repos/heketi/heketi/pulls/620"}}},"pull_request":{"url":"https://api.github.com/repos/heketi/heketi/pulls/620","id":97167546,"html_url":"https://github.com/heketi/heketi/pull/620","diff_url":"https://github.com/heketi/heketi/pull/620.diff","patch_url":"https://github.com/heketi/heketi/pull/620.patch","issue_url":"https://api.github.com/repos/heketi/heketi/issues/620","number":620,"state":"open","locked":false,"title":"Enable Logging to a File","user":{"login":"ramkrsna","id":466983,"avatar_url":"https://avatars.githubusercontent.com/u/466983?v=3","gravatar_id":"","url":"https://api.github.com/users/ramkrsna","html_url":"https://github.com/ramkrsna","followers_url":"https://api.github.com/users/ramkrsna/followers","following_url":"https://api.github.com/users/ramkrsna/following{/other_user}","gists_url":"https://api.github.com/users/ramkrsna/gists{/gist_id}","starred_url":"https://api.github.com/users/ramkrsna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ramkrsna/subscriptions","organizations_url":"https://api.github.com/users/ramkrsna/orgs","repos_url":"https://api.github.com/users/ramkrsna/repos","events_url":"https://api.github.com/users/ramkrsna/events{/privacy}","received_events_url":"https://api.github.com/users/ramkrsna/received_events","type":"User","site_admin":false},"body":"Logging to a specified heketi.log file .  #552 #619 \r\n[1363602](https://bugzilla.redhat.com/show_bug.cgi?id=1363602) Heketi server logs needs to be persisted \r\n\r\n\r\nSigned-off-by: Ramakrishna Reddy Yekulla <rreddy@redhat.com>","created_at":"2016-12-08T17:39:14Z","updated_at":"2016-12-09T09:47:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5e99360db645d88f8d1e11e6187c31e3137d5c54","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/heketi/heketi/pulls/620/commits","review_comments_url":"https://api.github.com/repos/heketi/heketi/pulls/620/comments","review_comment_url":"https://api.github.com/repos/heketi/heketi/pulls/comments{/number}","comments_url":"https://api.github.com/repos/heketi/heketi/issues/620/comments","statuses_url":"https://api.github.com/repos/heketi/heketi/statuses/8c3c03649ca62c9110e6ab17e2c8b2b248b00d87","head":{"label":"ramkrsna:presistent","ref":"presistent","sha":"8c3c03649ca62c9110e6ab17e2c8b2b248b00d87","user":{"login":"ramkrsna","id":466983,"avatar_url":"https://avatars.githubusercontent.com/u/466983?v=3","gravatar_id":"","url":"https://api.github.com/users/ramkrsna","html_url":"https://github.com/ramkrsna","followers_url":"https://api.github.com/users/ramkrsna/followers","following_url":"https://api.github.com/users/ramkrsna/following{/other_user}","gists_url":"https://api.github.com/users/ramkrsna/gists{/gist_id}","starred_url":"https://api.github.com/users/ramkrsna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ramkrsna/subscriptions","organizations_url":"https://api.github.com/users/ramkrsna/orgs","repos_url":"https://api.github.com/users/ramkrsna/repos","events_url":"https://api.github.com/users/ramkrsna/events{/privacy}","received_events_url":"https://api.github.com/users/ramkrsna/received_events","type":"User","site_admin":false},"repo":{"id":65298201,"name":"heketi","full_name":"ramkrsna/heketi","owner":{"login":"ramkrsna","id":466983,"avatar_url":"https://avatars.githubusercontent.com/u/466983?v=3","gravatar_id":"","url":"https://api.github.com/users/ramkrsna","html_url":"https://github.com/ramkrsna","followers_url":"https://api.github.com/users/ramkrsna/followers","following_url":"https://api.github.com/users/ramkrsna/following{/other_user}","gists_url":"https://api.github.com/users/ramkrsna/gists{/gist_id}","starred_url":"https://api.github.com/users/ramkrsna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ramkrsna/subscriptions","organizations_url":"https://api.github.com/users/ramkrsna/orgs","repos_url":"https://api.github.com/users/ramkrsna/repos","events_url":"https://api.github.com/users/ramkrsna/events{/privacy}","received_events_url":"https://api.github.com/users/ramkrsna/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ramkrsna/heketi","description":"RESTful based volume management framework for GlusterFS","fork":true,"url":"https://api.github.com/repos/ramkrsna/heketi","forks_url":"https://api.github.com/repos/ramkrsna/heketi/forks","keys_url":"https://api.github.com/repos/ramkrsna/heketi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ramkrsna/heketi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ramkrsna/heketi/teams","hooks_url":"https://api.github.com/repos/ramkrsna/heketi/hooks","issue_events_url":"https://api.github.com/repos/ramkrsna/heketi/issues/events{/number}","events_url":"https://api.github.com/repos/ramkrsna/heketi/events","assignees_url":"https://api.github.com/repos/ramkrsna/heketi/assignees{/user}","branches_url":"https://api.github.com/repos/ramkrsna/heketi/branches{/branch}","tags_url":"https://api.github.com/repos/ramkrsna/heketi/tags","blobs_url":"https://api.github.com/repos/ramkrsna/heketi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ramkrsna/heketi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ramkrsna/heketi/git/refs{/sha}","trees_url":"https://api.github.com/repos/ramkrsna/heketi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ramkrsna/heketi/statuses/{sha}","languages_url":"https://api.github.com/repos/ramkrsna/heketi/languages","stargazers_url":"https://api.github.com/repos/ramkrsna/heketi/stargazers","contributors_url":"https://api.github.com/repos/ramkrsna/heketi/contributors","subscribers_url":"https://api.github.com/repos/ramkrsna/heketi/subscribers","subscription_url":"https://api.github.com/repos/ramkrsna/heketi/subscription","commits_url":"https://api.github.com/repos/ramkrsna/heketi/commits{/sha}","git_commits_url":"https://api.github.com/repos/ramkrsna/heketi/git/commits{/sha}","comments_url":"https://api.github.com/repos/ramkrsna/heketi/comments{/number}","issue_comment_url":"https://api.github.com/repos/ramkrsna/heketi/issues/comments{/number}","contents_url":"https://api.github.com/repos/ramkrsna/heketi/contents/{+path}","compare_url":"https://api.github.com/repos/ramkrsna/heketi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ramkrsna/heketi/merges","archive_url":"https://api.github.com/repos/ramkrsna/heketi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ramkrsna/heketi/downloads","issues_url":"https://api.github.com/repos/ramkrsna/heketi/issues{/number}","pulls_url":"https://api.github.com/repos/ramkrsna/heketi/pulls{/number}","milestones_url":"https://api.github.com/repos/ramkrsna/heketi/milestones{/number}","notifications_url":"https://api.github.com/repos/ramkrsna/heketi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ramkrsna/heketi/labels{/name}","releases_url":"https://api.github.com/repos/ramkrsna/heketi/releases{/id}","deployments_url":"https://api.github.com/repos/ramkrsna/heketi/deployments","created_at":"2016-08-09T13:42:40Z","updated_at":"2016-08-09T13:42:44Z","pushed_at":"2016-12-09T08:47:45Z","git_url":"git://github.com/ramkrsna/heketi.git","ssh_url":"git@github.com:ramkrsna/heketi.git","clone_url":"https://github.com/ramkrsna/heketi.git","svn_url":"https://github.com/ramkrsna/heketi","homepage":"","size":7615,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"heketi:master","ref":"master","sha":"255ff7a68de06d3016379817c213a9875c66107f","user":{"login":"heketi","id":12890374,"avatar_url":"https://avatars.githubusercontent.com/u/12890374?v=3","gravatar_id":"","url":"https://api.github.com/users/heketi","html_url":"https://github.com/heketi","followers_url":"https://api.github.com/users/heketi/followers","following_url":"https://api.github.com/users/heketi/following{/other_user}","gists_url":"https://api.github.com/users/heketi/gists{/gist_id}","starred_url":"https://api.github.com/users/heketi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heketi/subscriptions","organizations_url":"https://api.github.com/users/heketi/orgs","repos_url":"https://api.github.com/users/heketi/repos","events_url":"https://api.github.com/users/heketi/events{/privacy}","received_events_url":"https://api.github.com/users/heketi/received_events","type":"Organization","site_admin":false},"repo":{"id":37446835,"name":"heketi","full_name":"heketi/heketi","owner":{"login":"heketi","id":12890374,"avatar_url":"https://avatars.githubusercontent.com/u/12890374?v=3","gravatar_id":"","url":"https://api.github.com/users/heketi","html_url":"https://github.com/heketi","followers_url":"https://api.github.com/users/heketi/followers","following_url":"https://api.github.com/users/heketi/following{/other_user}","gists_url":"https://api.github.com/users/heketi/gists{/gist_id}","starred_url":"https://api.github.com/users/heketi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heketi/subscriptions","organizations_url":"https://api.github.com/users/heketi/orgs","repos_url":"https://api.github.com/users/heketi/repos","events_url":"https://api.github.com/users/heketi/events{/privacy}","received_events_url":"https://api.github.com/users/heketi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/heketi/heketi","description":"RESTful based volume management framework for GlusterFS","fork":false,"url":"https://api.github.com/repos/heketi/heketi","forks_url":"https://api.github.com/repos/heketi/heketi/forks","keys_url":"https://api.github.com/repos/heketi/heketi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/heketi/heketi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/heketi/heketi/teams","hooks_url":"https://api.github.com/repos/heketi/heketi/hooks","issue_events_url":"https://api.github.com/repos/heketi/heketi/issues/events{/number}","events_url":"https://api.github.com/repos/heketi/heketi/events","assignees_url":"https://api.github.com/repos/heketi/heketi/assignees{/user}","branches_url":"https://api.github.com/repos/heketi/heketi/branches{/branch}","tags_url":"https://api.github.com/repos/heketi/heketi/tags","blobs_url":"https://api.github.com/repos/heketi/heketi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/heketi/heketi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/heketi/heketi/git/refs{/sha}","trees_url":"https://api.github.com/repos/heketi/heketi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/heketi/heketi/statuses/{sha}","languages_url":"https://api.github.com/repos/heketi/heketi/languages","stargazers_url":"https://api.github.com/repos/heketi/heketi/stargazers","contributors_url":"https://api.github.com/repos/heketi/heketi/contributors","subscribers_url":"https://api.github.com/repos/heketi/heketi/subscribers","subscription_url":"https://api.github.com/repos/heketi/heketi/subscription","commits_url":"https://api.github.com/repos/heketi/heketi/commits{/sha}","git_commits_url":"https://api.github.com/repos/heketi/heketi/git/commits{/sha}","comments_url":"https://api.github.com/repos/heketi/heketi/comments{/number}","issue_comment_url":"https://api.github.com/repos/heketi/heketi/issues/comments{/number}","contents_url":"https://api.github.com/repos/heketi/heketi/contents/{+path}","compare_url":"https://api.github.com/repos/heketi/heketi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/heketi/heketi/merges","archive_url":"https://api.github.com/repos/heketi/heketi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/heketi/heketi/downloads","issues_url":"https://api.github.com/repos/heketi/heketi/issues{/number}","pulls_url":"https://api.github.com/repos/heketi/heketi/pulls{/number}","milestones_url":"https://api.github.com/repos/heketi/heketi/milestones{/number}","notifications_url":"https://api.github.com/repos/heketi/heketi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/heketi/heketi/labels{/name}","releases_url":"https://api.github.com/repos/heketi/heketi/releases{/id}","deployments_url":"https://api.github.com/repos/heketi/heketi/deployments","created_at":"2015-06-15T06:10:11Z","updated_at":"2016-12-06T06:50:07Z","pushed_at":"2016-12-09T08:47:46Z","git_url":"git://github.com/heketi/heketi.git","ssh_url":"git@github.com:heketi/heketi.git","clone_url":"https://github.com/heketi/heketi.git","svn_url":"https://github.com/heketi/heketi","homepage":"","size":9272,"stargazers_count":115,"watchers_count":115,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":30,"mirror_url":null,"open_issues_count":63,"forks":30,"open_issues":63,"watchers":115,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/heketi/heketi/pulls/620"},"html":{"href":"https://github.com/heketi/heketi/pull/620"},"issue":{"href":"https://api.github.com/repos/heketi/heketi/issues/620"},"comments":{"href":"https://api.github.com/repos/heketi/heketi/issues/620/comments"},"review_comments":{"href":"https://api.github.com/repos/heketi/heketi/pulls/620/comments"},"review_comment":{"href":"https://api.github.com/repos/heketi/heketi/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/heketi/heketi/pulls/620/commits"},"statuses":{"href":"https://api.github.com/repos/heketi/heketi/statuses/8c3c03649ca62c9110e6ab17e2c8b2b248b00d87"}}}}
{"actor":{"display_login":"obnoxxx"}}