{"action":"created","comment":{"url":"https://api.github.com/repos/mainflux/mainflux/pulls/comments/219643512","pull_request_review_id":157877306,"id":219643512,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxOTY0MzUxMg==","diff_hunk":"@@ -23,27 +27,44 @@ type Logger interface {\n \tError(string)\n }\n \n+var logLevels = map[string]level.Option{\n+\t\"debug\": level.AllowDebug(),\n+\t\"info\":  level.AllowInfo(),\n+\t\"warn\":  level.AllowWarn(),\n+\t\"error\": level.AllowError(),\n+}\n+\n var _ Logger = (*logger)(nil)\n \n type logger struct {\n \tkitLogger log.Logger\n }\n \n // New returns wrapped go kit logger.\n-func New(out io.Writer) Logger {\n+func New(out io.Writer, logLevel string) Logger {","path":"logger/logger.go","position":36,"original_position":36,"commit_id":"b07c6ae26499758753de2b223fab747610dceef9","original_commit_id":"b07c6ae26499758753de2b223fab747610dceef9","user":{"login":"anovakovic01","id":16108178,"node_id":"MDQ6VXNlcjE2MTA4MTc4","avatar_url":"https://avatars2.githubusercontent.com/u/16108178?v=4","gravatar_id":"","url":"https://api.github.com/users/anovakovic01","html_url":"https://github.com/anovakovic01","followers_url":"https://api.github.com/users/anovakovic01/followers","following_url":"https://api.github.com/users/anovakovic01/following{/other_user}","gists_url":"https://api.github.com/users/anovakovic01/gists{/gist_id}","starred_url":"https://api.github.com/users/anovakovic01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anovakovic01/subscriptions","organizations_url":"https://api.github.com/users/anovakovic01/orgs","repos_url":"https://api.github.com/users/anovakovic01/repos","events_url":"https://api.github.com/users/anovakovic01/events{/privacy}","received_events_url":"https://api.github.com/users/anovakovic01/received_events","type":"User","site_admin":false},"body":"Use this enumeration instead of string.","created_at":"2018-09-21T22:35:48Z","updated_at":"2018-09-21T22:35:52Z","html_url":"https://github.com/mainflux/mainflux/pull/402#discussion_r219643512","pull_request_url":"https://api.github.com/repos/mainflux/mainflux/pulls/402","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/mainflux/mainflux/pulls/comments/219643512"},"html":{"href":"https://github.com/mainflux/mainflux/pull/402#discussion_r219643512"},"pull_request":{"href":"https://api.github.com/repos/mainflux/mainflux/pulls/402"}}},"pull_request":{"url":"https://api.github.com/repos/mainflux/mainflux/pulls/402","id":217294871,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE3Mjk0ODcx","html_url":"https://github.com/mainflux/mainflux/pull/402","diff_url":"https://github.com/mainflux/mainflux/pull/402.diff","patch_url":"https://github.com/mainflux/mainflux/pull/402.patch","issue_url":"https://api.github.com/repos/mainflux/mainflux/issues/402","number":402,"state":"open","locked":false,"title":"MF-379 - Log Level Option","user":{"login":"mfinley3","id":9580064,"node_id":"MDQ6VXNlcjk1ODAwNjQ=","avatar_url":"https://avatars3.githubusercontent.com/u/9580064?v=4","gravatar_id":"","url":"https://api.github.com/users/mfinley3","html_url":"https://github.com/mfinley3","followers_url":"https://api.github.com/users/mfinley3/followers","following_url":"https://api.github.com/users/mfinley3/following{/other_user}","gists_url":"https://api.github.com/users/mfinley3/gists{/gist_id}","starred_url":"https://api.github.com/users/mfinley3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfinley3/subscriptions","organizations_url":"https://api.github.com/users/mfinley3/orgs","repos_url":"https://api.github.com/users/mfinley3/repos","events_url":"https://api.github.com/users/mfinley3/events{/privacy}","received_events_url":"https://api.github.com/users/mfinley3/received_events","type":"User","site_admin":false},"body":"### What does this do?\r\nAdds a log level option for each component of mainflux so users can set what logs they want.\r\n\r\n### Which issue(s) does this PR fix/relate to?\r\n#379 \r\n\r\n### List any changes that modify/break current functionality\r\nNothing should break/modify default functionality.\r\n\r\n### Have you included tests for your changes?\r\nUnit tests for the log level have been added\r\n\r\n### Did you document any new/modified functionality?\r\nYes, readmes have been updated with the new log level env option.\r\n\r\n### Notes\r\nIf any bad input is given or level is left unselected, level defaults to info. \r\n\r\nRegarding the size of this PR, let me know if you would me to break this up in some way since there were two vendor files added\r\n\r\nSigned-off-by: mfinley3 <Michael.Finley@target.com>","created_at":"2018-09-21T14:04:07Z","updated_at":"2018-09-21T22:35:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9db01008ee4a7b378d38230553b7d4a1860afc0d","assignee":null,"assignees":[],"requested_reviewers":[{"login":"nmarcetic","id":6399555,"node_id":"MDQ6VXNlcjYzOTk1NTU=","avatar_url":"https://avatars3.githubusercontent.com/u/6399555?v=4","gravatar_id":"","url":"https://api.github.com/users/nmarcetic","html_url":"https://github.com/nmarcetic","followers_url":"https://api.github.com/users/nmarcetic/followers","following_url":"https://api.github.com/users/nmarcetic/following{/other_user}","gists_url":"https://api.github.com/users/nmarcetic/gists{/gist_id}","starred_url":"https://api.github.com/users/nmarcetic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nmarcetic/subscriptions","organizations_url":"https://api.github.com/users/nmarcetic/orgs","repos_url":"https://api.github.com/users/nmarcetic/repos","events_url":"https://api.github.com/users/nmarcetic/events{/privacy}","received_events_url":"https://api.github.com/users/nmarcetic/received_events","type":"User","site_admin":false},{"login":"dusanb94","id":17817225,"node_id":"MDQ6VXNlcjE3ODE3MjI1","avatar_url":"https://avatars0.githubusercontent.com/u/17817225?v=4","gravatar_id":"","url":"https://api.github.com/users/dusanb94","html_url":"https://github.com/dusanb94","followers_url":"https://api.github.com/users/dusanb94/followers","following_url":"https://api.github.com/users/dusanb94/following{/other_user}","gists_url":"https://api.github.com/users/dusanb94/gists{/gist_id}","starred_url":"https://api.github.com/users/dusanb94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dusanb94/subscriptions","organizations_url":"https://api.github.com/users/dusanb94/orgs","repos_url":"https://api.github.com/users/dusanb94/repos","events_url":"https://api.github.com/users/dusanb94/events{/privacy}","received_events_url":"https://api.github.com/users/dusanb94/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mainflux/mainflux/pulls/402/commits","review_comments_url":"https://api.github.com/repos/mainflux/mainflux/pulls/402/comments","review_comment_url":"https://api.github.com/repos/mainflux/mainflux/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mainflux/mainflux/issues/402/comments","statuses_url":"https://api.github.com/repos/mainflux/mainflux/statuses/b07c6ae26499758753de2b223fab747610dceef9","head":{"label":"mfinley3:MF-379","ref":"MF-379","sha":"b07c6ae26499758753de2b223fab747610dceef9","user":{"login":"mfinley3","id":9580064,"node_id":"MDQ6VXNlcjk1ODAwNjQ=","avatar_url":"https://avatars3.githubusercontent.com/u/9580064?v=4","gravatar_id":"","url":"https://api.github.com/users/mfinley3","html_url":"https://github.com/mfinley3","followers_url":"https://api.github.com/users/mfinley3/followers","following_url":"https://api.github.com/users/mfinley3/following{/other_user}","gists_url":"https://api.github.com/users/mfinley3/gists{/gist_id}","starred_url":"https://api.github.com/users/mfinley3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfinley3/subscriptions","organizations_url":"https://api.github.com/users/mfinley3/orgs","repos_url":"https://api.github.com/users/mfinley3/repos","events_url":"https://api.github.com/users/mfinley3/events{/privacy}","received_events_url":"https://api.github.com/users/mfinley3/received_events","type":"User","site_admin":false},"repo":{"id":149644011,"node_id":"MDEwOlJlcG9zaXRvcnkxNDk2NDQwMTE=","name":"mainflux","full_name":"mfinley3/mainflux","private":false,"owner":{"login":"mfinley3","id":9580064,"node_id":"MDQ6VXNlcjk1ODAwNjQ=","avatar_url":"https://avatars3.githubusercontent.com/u/9580064?v=4","gravatar_id":"","url":"https://api.github.com/users/mfinley3","html_url":"https://github.com/mfinley3","followers_url":"https://api.github.com/users/mfinley3/followers","following_url":"https://api.github.com/users/mfinley3/following{/other_user}","gists_url":"https://api.github.com/users/mfinley3/gists{/gist_id}","starred_url":"https://api.github.com/users/mfinley3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfinley3/subscriptions","organizations_url":"https://api.github.com/users/mfinley3/orgs","repos_url":"https://api.github.com/users/mfinley3/repos","events_url":"https://api.github.com/users/mfinley3/events{/privacy}","received_events_url":"https://api.github.com/users/mfinley3/received_events","type":"User","site_admin":false},"html_url":"https://github.com/mfinley3/mainflux","description":"Industrial IoT Messaging and Device Management Server","fork":true,"url":"https://api.github.com/repos/mfinley3/mainflux","forks_url":"https://api.github.com/repos/mfinley3/mainflux/forks","keys_url":"https://api.github.com/repos/mfinley3/mainflux/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mfinley3/mainflux/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mfinley3/mainflux/teams","hooks_url":"https://api.github.com/repos/mfinley3/mainflux/hooks","issue_events_url":"https://api.github.com/repos/mfinley3/mainflux/issues/events{/number}","events_url":"https://api.github.com/repos/mfinley3/mainflux/events","assignees_url":"https://api.github.com/repos/mfinley3/mainflux/assignees{/user}","branches_url":"https://api.github.com/repos/mfinley3/mainflux/branches{/branch}","tags_url":"https://api.github.com/repos/mfinley3/mainflux/tags","blobs_url":"https://api.github.com/repos/mfinley3/mainflux/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mfinley3/mainflux/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mfinley3/mainflux/git/refs{/sha}","trees_url":"https://api.github.com/repos/mfinley3/mainflux/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mfinley3/mainflux/statuses/{sha}","languages_url":"https://api.github.com/repos/mfinley3/mainflux/languages","stargazers_url":"https://api.github.com/repos/mfinley3/mainflux/stargazers","contributors_url":"https://api.github.com/repos/mfinley3/mainflux/contributors","subscribers_url":"https://api.github.com/repos/mfinley3/mainflux/subscribers","subscription_url":"https://api.github.com/repos/mfinley3/mainflux/subscription","commits_url":"https://api.github.com/repos/mfinley3/mainflux/commits{/sha}","git_commits_url":"https://api.github.com/repos/mfinley3/mainflux/git/commits{/sha}","comments_url":"https://api.github.com/repos/mfinley3/mainflux/comments{/number}","issue_comment_url":"https://api.github.com/repos/mfinley3/mainflux/issues/comments{/number}","contents_url":"https://api.github.com/repos/mfinley3/mainflux/contents/{+path}","compare_url":"https://api.github.com/repos/mfinley3/mainflux/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mfinley3/mainflux/merges","archive_url":"https://api.github.com/repos/mfinley3/mainflux/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mfinley3/mainflux/downloads","issues_url":"https://api.github.com/repos/mfinley3/mainflux/issues{/number}","pulls_url":"https://api.github.com/repos/mfinley3/mainflux/pulls{/number}","milestones_url":"https://api.github.com/repos/mfinley3/mainflux/milestones{/number}","notifications_url":"https://api.github.com/repos/mfinley3/mainflux/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mfinley3/mainflux/labels{/name}","releases_url":"https://api.github.com/repos/mfinley3/mainflux/releases{/id}","deployments_url":"https://api.github.com/repos/mfinley3/mainflux/deployments","created_at":"2018-09-20T17:12:34Z","updated_at":"2018-09-21T20:49:47Z","pushed_at":"2018-09-21T20:49:46Z","git_url":"git://github.com/mfinley3/mainflux.git","ssh_url":"git@github.com:mfinley3/mainflux.git","clone_url":"https://github.com/mfinley3/mainflux.git","svn_url":"https://github.com/mfinley3/mainflux","homepage":"","size":19959,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mainflux:master","ref":"master","sha":"8e9d7b4fdb16d6b2c967aa4816f42bc2eb6b80d1","user":{"login":"mainflux","id":13207490,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMjA3NDkw","avatar_url":"https://avatars1.githubusercontent.com/u/13207490?v=4","gravatar_id":"","url":"https://api.github.com/users/mainflux","html_url":"https://github.com/mainflux","followers_url":"https://api.github.com/users/mainflux/followers","following_url":"https://api.github.com/users/mainflux/following{/other_user}","gists_url":"https://api.github.com/users/mainflux/gists{/gist_id}","starred_url":"https://api.github.com/users/mainflux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mainflux/subscriptions","organizations_url":"https://api.github.com/users/mainflux/orgs","repos_url":"https://api.github.com/users/mainflux/repos","events_url":"https://api.github.com/users/mainflux/events{/privacy}","received_events_url":"https://api.github.com/users/mainflux/received_events","type":"Organization","site_admin":false},"repo":{"id":38644318,"node_id":"MDEwOlJlcG9zaXRvcnkzODY0NDMxOA==","name":"mainflux","full_name":"mainflux/mainflux","private":false,"owner":{"login":"mainflux","id":13207490,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMjA3NDkw","avatar_url":"https://avatars1.githubusercontent.com/u/13207490?v=4","gravatar_id":"","url":"https://api.github.com/users/mainflux","html_url":"https://github.com/mainflux","followers_url":"https://api.github.com/users/mainflux/followers","following_url":"https://api.github.com/users/mainflux/following{/other_user}","gists_url":"https://api.github.com/users/mainflux/gists{/gist_id}","starred_url":"https://api.github.com/users/mainflux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mainflux/subscriptions","organizations_url":"https://api.github.com/users/mainflux/orgs","repos_url":"https://api.github.com/users/mainflux/repos","events_url":"https://api.github.com/users/mainflux/events{/privacy}","received_events_url":"https://api.github.com/users/mainflux/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/mainflux/mainflux","description":"Industrial IoT Messaging and Device Management Server","fork":false,"url":"https://api.github.com/repos/mainflux/mainflux","forks_url":"https://api.github.com/repos/mainflux/mainflux/forks","keys_url":"https://api.github.com/repos/mainflux/mainflux/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mainflux/mainflux/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mainflux/mainflux/teams","hooks_url":"https://api.github.com/repos/mainflux/mainflux/hooks","issue_events_url":"https://api.github.com/repos/mainflux/mainflux/issues/events{/number}","events_url":"https://api.github.com/repos/mainflux/mainflux/events","assignees_url":"https://api.github.com/repos/mainflux/mainflux/assignees{/user}","branches_url":"https://api.github.com/repos/mainflux/mainflux/branches{/branch}","tags_url":"https://api.github.com/repos/mainflux/mainflux/tags","blobs_url":"https://api.github.com/repos/mainflux/mainflux/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mainflux/mainflux/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mainflux/mainflux/git/refs{/sha}","trees_url":"https://api.github.com/repos/mainflux/mainflux/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mainflux/mainflux/statuses/{sha}","languages_url":"https://api.github.com/repos/mainflux/mainflux/languages","stargazers_url":"https://api.github.com/repos/mainflux/mainflux/stargazers","contributors_url":"https://api.github.com/repos/mainflux/mainflux/contributors","subscribers_url":"https://api.github.com/repos/mainflux/mainflux/subscribers","subscription_url":"https://api.github.com/repos/mainflux/mainflux/subscription","commits_url":"https://api.github.com/repos/mainflux/mainflux/commits{/sha}","git_commits_url":"https://api.github.com/repos/mainflux/mainflux/git/commits{/sha}","comments_url":"https://api.github.com/repos/mainflux/mainflux/comments{/number}","issue_comment_url":"https://api.github.com/repos/mainflux/mainflux/issues/comments{/number}","contents_url":"https://api.github.com/repos/mainflux/mainflux/contents/{+path}","compare_url":"https://api.github.com/repos/mainflux/mainflux/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mainflux/mainflux/merges","archive_url":"https://api.github.com/repos/mainflux/mainflux/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mainflux/mainflux/downloads","issues_url":"https://api.github.com/repos/mainflux/mainflux/issues{/number}","pulls_url":"https://api.github.com/repos/mainflux/mainflux/pulls{/number}","milestones_url":"https://api.github.com/repos/mainflux/mainflux/milestones{/number}","notifications_url":"https://api.github.com/repos/mainflux/mainflux/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mainflux/mainflux/labels{/name}","releases_url":"https://api.github.com/repos/mainflux/mainflux/releases{/id}","deployments_url":"https://api.github.com/repos/mainflux/mainflux/deployments","created_at":"2015-07-06T20:31:50Z","updated_at":"2018-09-21T18:02:01Z","pushed_at":"2018-09-21T17:10:47Z","git_url":"git://github.com/mainflux/mainflux.git","ssh_url":"git@github.com:mainflux/mainflux.git","clone_url":"https://github.com/mainflux/mainflux.git","svn_url":"https://github.com/mainflux/mainflux","homepage":"","size":19938,"stargazers_count":151,"watchers_count":151,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":51,"mirror_url":null,"archived":false,"open_issues_count":33,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":51,"open_issues":33,"watchers":151,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mainflux/mainflux/pulls/402"},"html":{"href":"https://github.com/mainflux/mainflux/pull/402"},"issue":{"href":"https://api.github.com/repos/mainflux/mainflux/issues/402"},"comments":{"href":"https://api.github.com/repos/mainflux/mainflux/issues/402/comments"},"review_comments":{"href":"https://api.github.com/repos/mainflux/mainflux/pulls/402/comments"},"review_comment":{"href":"https://api.github.com/repos/mainflux/mainflux/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mainflux/mainflux/pulls/402/commits"},"statuses":{"href":"https://api.github.com/repos/mainflux/mainflux/statuses/b07c6ae26499758753de2b223fab747610dceef9"}},"author_association":"NONE"}}
{"actor":{"display_login":"anovakovic01"}}