{"action":"closed","number":269,"pull_request":{"url":"https://api.github.com/repos/status-im/status-go/pulls/269","id":137484603,"html_url":"https://github.com/status-im/status-go/pull/269","diff_url":"https://github.com/status-im/status-go/pull/269.diff","patch_url":"https://github.com/status-im/status-go/pull/269.patch","issue_url":"https://api.github.com/repos/status-im/status-go/issues/269","number":269,"state":"closed","locked":false,"title":"Add file logger support","user":{"login":"divan","id":880202,"avatar_url":"https://avatars2.githubusercontent.com/u/880202?v=4","gravatar_id":"","url":"https://api.github.com/users/divan","html_url":"https://github.com/divan","followers_url":"https://api.github.com/users/divan/followers","following_url":"https://api.github.com/users/divan/following{/other_user}","gists_url":"https://api.github.com/users/divan/gists{/gist_id}","starred_url":"https://api.github.com/users/divan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/divan/subscriptions","organizations_url":"https://api.github.com/users/divan/orgs","repos_url":"https://api.github.com/users/divan/repos","events_url":"https://api.github.com/users/divan/events{/privacy}","received_events_url":"https://api.github.com/users/divan/received_events","type":"User","site_admin":false},"body":"This PR adds support for file logging, as mentioned in https://github.com/status-im/status-go/issues/268#issuecomment-324616980.\r\n\r\nA few moments, discovered while implementing this:\r\n- `config.json` is never read and node configuration is constructed using defaults + command line flags. Instead of trying to resolve this issue in this PR, I added new command line flag (`--logfile`) for specifying the log file. `LogFile` option in node configuration thus redundant at the moment.\r\n - log file is meant to be for debugging sessions, and not for long running server instances, as it lacks file rotation, compression, renaming and other typical log management stuff. Maybe it should be documented clearly in command line description or docs?\r\n - there is a file `cmd/statusd/testing.go` that is not meant to be compiled for non-tests. But it is compliled, because of dependency from `utils.go`, which can't be `utils_test.go` due to cgo usage. The byproduct of this inclusion is that `init()` function in testing.go gets executed during normal statusd run, and currently it also sets log level to \"ERROR\". It's not a problem right now, `init()`-functions are executed in the lexical order of files being passed to the compiler, but it's obscure and smells and should refactored as well.","created_at":"2017-08-24T15:34:06Z","updated_at":"2017-09-01T18:44:50Z","closed_at":"2017-09-01T18:44:50Z","merged_at":"2017-09-01T18:44:50Z","merge_commit_sha":"0c4603d825ae5c4be3d87e99eff6e849452e25e6","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/status-im/status-go/pulls/269/commits","review_comments_url":"https://api.github.com/repos/status-im/status-go/pulls/269/comments","review_comment_url":"https://api.github.com/repos/status-im/status-go/pulls/comments{/number}","comments_url":"https://api.github.com/repos/status-im/status-go/issues/269/comments","statuses_url":"https://api.github.com/repos/status-im/status-go/statuses/1871833de61bc99fd526587f214c4ab4f2921610","head":{"label":"divan:develop","ref":"develop","sha":"1871833de61bc99fd526587f214c4ab4f2921610","user":{"login":"divan","id":880202,"avatar_url":"https://avatars2.githubusercontent.com/u/880202?v=4","gravatar_id":"","url":"https://api.github.com/users/divan","html_url":"https://github.com/divan","followers_url":"https://api.github.com/users/divan/followers","following_url":"https://api.github.com/users/divan/following{/other_user}","gists_url":"https://api.github.com/users/divan/gists{/gist_id}","starred_url":"https://api.github.com/users/divan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/divan/subscriptions","organizations_url":"https://api.github.com/users/divan/orgs","repos_url":"https://api.github.com/users/divan/repos","events_url":"https://api.github.com/users/divan/events{/privacy}","received_events_url":"https://api.github.com/users/divan/received_events","type":"User","site_admin":false},"repo":{"id":101309447,"name":"status-go","full_name":"divan/status-go","owner":{"login":"divan","id":880202,"avatar_url":"https://avatars2.githubusercontent.com/u/880202?v=4","gravatar_id":"","url":"https://api.github.com/users/divan","html_url":"https://github.com/divan","followers_url":"https://api.github.com/users/divan/followers","following_url":"https://api.github.com/users/divan/following{/other_user}","gists_url":"https://api.github.com/users/divan/gists{/gist_id}","starred_url":"https://api.github.com/users/divan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/divan/subscriptions","organizations_url":"https://api.github.com/users/divan/orgs","repos_url":"https://api.github.com/users/divan/repos","events_url":"https://api.github.com/users/divan/events{/privacy}","received_events_url":"https://api.github.com/users/divan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/divan/status-go","description":"The Status module that consumes go-ethereum","fork":true,"url":"https://api.github.com/repos/divan/status-go","forks_url":"https://api.github.com/repos/divan/status-go/forks","keys_url":"https://api.github.com/repos/divan/status-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/divan/status-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/divan/status-go/teams","hooks_url":"https://api.github.com/repos/divan/status-go/hooks","issue_events_url":"https://api.github.com/repos/divan/status-go/issues/events{/number}","events_url":"https://api.github.com/repos/divan/status-go/events","assignees_url":"https://api.github.com/repos/divan/status-go/assignees{/user}","branches_url":"https://api.github.com/repos/divan/status-go/branches{/branch}","tags_url":"https://api.github.com/repos/divan/status-go/tags","blobs_url":"https://api.github.com/repos/divan/status-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/divan/status-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/divan/status-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/divan/status-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/divan/status-go/statuses/{sha}","languages_url":"https://api.github.com/repos/divan/status-go/languages","stargazers_url":"https://api.github.com/repos/divan/status-go/stargazers","contributors_url":"https://api.github.com/repos/divan/status-go/contributors","subscribers_url":"https://api.github.com/repos/divan/status-go/subscribers","subscription_url":"https://api.github.com/repos/divan/status-go/subscription","commits_url":"https://api.github.com/repos/divan/status-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/divan/status-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/divan/status-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/divan/status-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/divan/status-go/contents/{+path}","compare_url":"https://api.github.com/repos/divan/status-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/divan/status-go/merges","archive_url":"https://api.github.com/repos/divan/status-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/divan/status-go/downloads","issues_url":"https://api.github.com/repos/divan/status-go/issues{/number}","pulls_url":"https://api.github.com/repos/divan/status-go/pulls{/number}","milestones_url":"https://api.github.com/repos/divan/status-go/milestones{/number}","notifications_url":"https://api.github.com/repos/divan/status-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/divan/status-go/labels{/name}","releases_url":"https://api.github.com/repos/divan/status-go/releases{/id}","deployments_url":"https://api.github.com/repos/divan/status-go/deployments","created_at":"2017-08-24T15:19:24Z","updated_at":"2017-08-24T15:19:26Z","pushed_at":"2017-09-01T18:43:11Z","git_url":"git://github.com/divan/status-go.git","ssh_url":"git@github.com:divan/status-go.git","clone_url":"https://github.com/divan/status-go.git","svn_url":"https://github.com/divan/status-go","homepage":"https://status.im","size":20723,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"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":"develop"}},"base":{"label":"status-im:develop","ref":"develop","sha":"9f57cf422f46dbd52a11bcc7971204b9d748ec4d","user":{"login":"status-im","id":11767950,"avatar_url":"https://avatars1.githubusercontent.com/u/11767950?v=4","gravatar_id":"","url":"https://api.github.com/users/status-im","html_url":"https://github.com/status-im","followers_url":"https://api.github.com/users/status-im/followers","following_url":"https://api.github.com/users/status-im/following{/other_user}","gists_url":"https://api.github.com/users/status-im/gists{/gist_id}","starred_url":"https://api.github.com/users/status-im/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/status-im/subscriptions","organizations_url":"https://api.github.com/users/status-im/orgs","repos_url":"https://api.github.com/users/status-im/repos","events_url":"https://api.github.com/users/status-im/events{/privacy}","received_events_url":"https://api.github.com/users/status-im/received_events","type":"Organization","site_admin":false},"repo":{"id":61047867,"name":"status-go","full_name":"status-im/status-go","owner":{"login":"status-im","id":11767950,"avatar_url":"https://avatars1.githubusercontent.com/u/11767950?v=4","gravatar_id":"","url":"https://api.github.com/users/status-im","html_url":"https://github.com/status-im","followers_url":"https://api.github.com/users/status-im/followers","following_url":"https://api.github.com/users/status-im/following{/other_user}","gists_url":"https://api.github.com/users/status-im/gists{/gist_id}","starred_url":"https://api.github.com/users/status-im/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/status-im/subscriptions","organizations_url":"https://api.github.com/users/status-im/orgs","repos_url":"https://api.github.com/users/status-im/repos","events_url":"https://api.github.com/users/status-im/events{/privacy}","received_events_url":"https://api.github.com/users/status-im/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/status-im/status-go","description":"The Status module that consumes go-ethereum","fork":false,"url":"https://api.github.com/repos/status-im/status-go","forks_url":"https://api.github.com/repos/status-im/status-go/forks","keys_url":"https://api.github.com/repos/status-im/status-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/status-im/status-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/status-im/status-go/teams","hooks_url":"https://api.github.com/repos/status-im/status-go/hooks","issue_events_url":"https://api.github.com/repos/status-im/status-go/issues/events{/number}","events_url":"https://api.github.com/repos/status-im/status-go/events","assignees_url":"https://api.github.com/repos/status-im/status-go/assignees{/user}","branches_url":"https://api.github.com/repos/status-im/status-go/branches{/branch}","tags_url":"https://api.github.com/repos/status-im/status-go/tags","blobs_url":"https://api.github.com/repos/status-im/status-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/status-im/status-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/status-im/status-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/status-im/status-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/status-im/status-go/statuses/{sha}","languages_url":"https://api.github.com/repos/status-im/status-go/languages","stargazers_url":"https://api.github.com/repos/status-im/status-go/stargazers","contributors_url":"https://api.github.com/repos/status-im/status-go/contributors","subscribers_url":"https://api.github.com/repos/status-im/status-go/subscribers","subscription_url":"https://api.github.com/repos/status-im/status-go/subscription","commits_url":"https://api.github.com/repos/status-im/status-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/status-im/status-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/status-im/status-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/status-im/status-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/status-im/status-go/contents/{+path}","compare_url":"https://api.github.com/repos/status-im/status-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/status-im/status-go/merges","archive_url":"https://api.github.com/repos/status-im/status-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/status-im/status-go/downloads","issues_url":"https://api.github.com/repos/status-im/status-go/issues{/number}","pulls_url":"https://api.github.com/repos/status-im/status-go/pulls{/number}","milestones_url":"https://api.github.com/repos/status-im/status-go/milestones{/number}","notifications_url":"https://api.github.com/repos/status-im/status-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/status-im/status-go/labels{/name}","releases_url":"https://api.github.com/repos/status-im/status-go/releases{/id}","deployments_url":"https://api.github.com/repos/status-im/status-go/deployments","created_at":"2016-06-13T15:32:03Z","updated_at":"2017-08-30T18:22:12Z","pushed_at":"2017-09-01T18:44:50Z","git_url":"git://github.com/status-im/status-go.git","ssh_url":"git@github.com:status-im/status-go.git","clone_url":"https://github.com/status-im/status-go.git","svn_url":"https://github.com/status-im/status-go","homepage":"https://status.im","size":20816,"stargazers_count":159,"watchers_count":159,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":41,"mirror_url":null,"open_issues_count":80,"forks":41,"open_issues":80,"watchers":159,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/status-im/status-go/pulls/269"},"html":{"href":"https://github.com/status-im/status-go/pull/269"},"issue":{"href":"https://api.github.com/repos/status-im/status-go/issues/269"},"comments":{"href":"https://api.github.com/repos/status-im/status-go/issues/269/comments"},"review_comments":{"href":"https://api.github.com/repos/status-im/status-go/pulls/269/comments"},"review_comment":{"href":"https://api.github.com/repos/status-im/status-go/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/status-im/status-go/pulls/269/commits"},"statuses":{"href":"https://api.github.com/repos/status-im/status-go/statuses/1871833de61bc99fd526587f214c4ab4f2921610"}},"author_association":"MEMBER","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"tiabc","id":2167748,"avatar_url":"https://avatars2.githubusercontent.com/u/2167748?v=4","gravatar_id":"","url":"https://api.github.com/users/tiabc","html_url":"https://github.com/tiabc","followers_url":"https://api.github.com/users/tiabc/followers","following_url":"https://api.github.com/users/tiabc/following{/other_user}","gists_url":"https://api.github.com/users/tiabc/gists{/gist_id}","starred_url":"https://api.github.com/users/tiabc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiabc/subscriptions","organizations_url":"https://api.github.com/users/tiabc/orgs","repos_url":"https://api.github.com/users/tiabc/repos","events_url":"https://api.github.com/users/tiabc/events{/privacy}","received_events_url":"https://api.github.com/users/tiabc/received_events","type":"User","site_admin":false},"comments":2,"review_comments":11,"maintainer_can_modify":false,"commits":12,"additions":104,"deletions":40,"changed_files":12}}
{"actor":{"display_login":"tiabc"}}