{"action":"created","comment":{"url":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/pulls/comments/83390420","pull_request_review_id":4237914,"id":83390420,"diff_hunk":"@@ -283,17 +295,17 @@ def log_stream_exists?(group_name, stream_name)\n     end\n \n     def find_log_stream(group_name, stream_name)\n-      next_token = nil\n-      loop do\n-        response = @logs.describe_log_streams(log_group_name: group_name, log_stream_name_prefix: stream_name, next_token: next_token)\n+      log_stream = nil\n+      response = @logs.describe_log_streams(\n+        log_group_name: group_name,\n+        log_stream_name_prefix: stream_name,\n+      )\n+      response.each do |page|\n         if (log_stream = response.log_streams.find {|i| i.log_stream_name == stream_name })","path":"lib/fluent/plugin/out_cloudwatch_logs.rb","position":null,"original_position":41,"commit_id":"026b6947267cfadfef1a026a61ce14525d6e2cad","original_commit_id":"7a736b526044fdf86d08ba2ffe40435bae544ea7","user":{"login":"adamchainz","id":857609,"avatar_url":"https://avatars.githubusercontent.com/u/857609?v=3","gravatar_id":"","url":"https://api.github.com/users/adamchainz","html_url":"https://github.com/adamchainz","followers_url":"https://api.github.com/users/adamchainz/followers","following_url":"https://api.github.com/users/adamchainz/following{/other_user}","gists_url":"https://api.github.com/users/adamchainz/gists{/gist_id}","starred_url":"https://api.github.com/users/adamchainz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamchainz/subscriptions","organizations_url":"https://api.github.com/users/adamchainz/orgs","repos_url":"https://api.github.com/users/adamchainz/repos","events_url":"https://api.github.com/users/adamchainz/events{/privacy}","received_events_url":"https://api.github.com/users/adamchainz/received_events","type":"User","site_admin":false},"body":"Woops, thanks!","created_at":"2016-10-14T09:47:00Z","updated_at":"2016-10-14T09:47:00Z","html_url":"https://github.com/ryotarai/fluent-plugin-cloudwatch-logs/pull/49#discussion_r83390420","pull_request_url":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/pulls/49","_links":{"self":{"href":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/pulls/comments/83390420"},"html":{"href":"https://github.com/ryotarai/fluent-plugin-cloudwatch-logs/pull/49#discussion_r83390420"},"pull_request":{"href":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/pulls/49"}}},"pull_request":{"url":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/pulls/49","id":73350859,"html_url":"https://github.com/ryotarai/fluent-plugin-cloudwatch-logs/pull/49","diff_url":"https://github.com/ryotarai/fluent-plugin-cloudwatch-logs/pull/49.diff","patch_url":"https://github.com/ryotarai/fluent-plugin-cloudwatch-logs/pull/49.patch","issue_url":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/issues/49","number":49,"state":"open","locked":false,"title":"Paginate during 'log_group_exists?'","user":{"login":"adamchainz","id":857609,"avatar_url":"https://avatars.githubusercontent.com/u/857609?v=3","gravatar_id":"","url":"https://api.github.com/users/adamchainz","html_url":"https://github.com/adamchainz","followers_url":"https://api.github.com/users/adamchainz/followers","following_url":"https://api.github.com/users/adamchainz/following{/other_user}","gists_url":"https://api.github.com/users/adamchainz/gists{/gist_id}","starred_url":"https://api.github.com/users/adamchainz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamchainz/subscriptions","organizations_url":"https://api.github.com/users/adamchainz/orgs","repos_url":"https://api.github.com/users/adamchainz/repos","events_url":"https://api.github.com/users/adamchainz/events{/privacy}","received_events_url":"https://api.github.com/users/adamchainz/received_events","type":"User","site_admin":false},"body":"Fixes #48.","created_at":"2016-06-10T10:15:35Z","updated_at":"2016-10-14T09:47:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"29db8c48ab497d6dc327ab2ce4397edcf4848871","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/pulls/49/commits","review_comments_url":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/pulls/49/comments","review_comment_url":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/issues/49/comments","statuses_url":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/statuses/026b6947267cfadfef1a026a61ce14525d6e2cad","head":{"label":"YPlan:issue_48_many_log_groups","ref":"issue_48_many_log_groups","sha":"026b6947267cfadfef1a026a61ce14525d6e2cad","user":{"login":"YPlan","id":2026115,"avatar_url":"https://avatars.githubusercontent.com/u/2026115?v=3","gravatar_id":"","url":"https://api.github.com/users/YPlan","html_url":"https://github.com/YPlan","followers_url":"https://api.github.com/users/YPlan/followers","following_url":"https://api.github.com/users/YPlan/following{/other_user}","gists_url":"https://api.github.com/users/YPlan/gists{/gist_id}","starred_url":"https://api.github.com/users/YPlan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YPlan/subscriptions","organizations_url":"https://api.github.com/users/YPlan/orgs","repos_url":"https://api.github.com/users/YPlan/repos","events_url":"https://api.github.com/users/YPlan/events{/privacy}","received_events_url":"https://api.github.com/users/YPlan/received_events","type":"Organization","site_admin":false},"repo":{"id":60838544,"name":"fluent-plugin-cloudwatch-logs","full_name":"YPlan/fluent-plugin-cloudwatch-logs","owner":{"login":"YPlan","id":2026115,"avatar_url":"https://avatars.githubusercontent.com/u/2026115?v=3","gravatar_id":"","url":"https://api.github.com/users/YPlan","html_url":"https://github.com/YPlan","followers_url":"https://api.github.com/users/YPlan/followers","following_url":"https://api.github.com/users/YPlan/following{/other_user}","gists_url":"https://api.github.com/users/YPlan/gists{/gist_id}","starred_url":"https://api.github.com/users/YPlan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YPlan/subscriptions","organizations_url":"https://api.github.com/users/YPlan/orgs","repos_url":"https://api.github.com/users/YPlan/repos","events_url":"https://api.github.com/users/YPlan/events{/privacy}","received_events_url":"https://api.github.com/users/YPlan/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/YPlan/fluent-plugin-cloudwatch-logs","description":"CloudWatch Logs Plugin for Fluentd","fork":true,"url":"https://api.github.com/repos/YPlan/fluent-plugin-cloudwatch-logs","forks_url":"https://api.github.com/repos/YPlan/fluent-plugin-cloudwatch-logs/forks","keys_url":"https://api.github.com/repos/YPlan/fluent-plugin-cloudwatch-logs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/YPlan/fluent-plugin-cloudwatch-logs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/YPlan/fluent-plugin-cloudwatch-logs/teams","hooks_url":"https://api.github.com/repos/YPlan/fluent-plugin-cloudwatch-logs/hooks","issue_events_url":"https://api.github.com/repos/YPlan/fluent-plugin-cloudwatch-logs/issues/events{/number}","events_url":"https://api.github.com/repos/YPlan/fluent-plugin-cloudwatch-logs/events","assignees_url":"https://api.github.com/repos/YPlan/fluent-plugin-cloudwatch-logs/assignees{/user}","branches_url":"https://api.github.com/repos/YPlan/fluent-plugin-cloudwatch-logs/branches{/branch}","tags_url":"https://api.github.com/repos/YPlan/fluent-plugin-cloudwatch-logs/tags","blobs_url":"https://api.github.com/repos/YPlan/fluent-plugin-cloudwatch-logs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/YPlan/fluent-plugin-cloudwatch-logs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/YPlan/fluent-plugin-cloudwatch-logs/git/refs{/sha}","trees_url":"https://api.github.com/repos/YPlan/fluent-plugin-cloudwatch-logs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/YPlan/fluent-plugin-cloudwatch-logs/statuses/{sha}","languages_url":"https://api.github.com/repos/YPlan/fluent-plugin-cloudwatch-logs/languages","stargazers_url":"https://api.github.com/repos/YPlan/fluent-plugin-cloudwatch-logs/stargazers","contributors_url":"https://api.github.com/repos/YPlan/fluent-plugin-cloudwatch-logs/contributors","subscribers_url":"https://api.github.com/repos/YPlan/fluent-plugin-cloudwatch-logs/subscribers","subscription_url":"https://api.github.com/repos/YPlan/fluent-plugin-cloudwatch-logs/subscription","commits_url":"https://api.github.com/repos/YPlan/fluent-plugin-cloudwatch-logs/commits{/sha}","git_commits_url":"https://api.github.com/repos/YPlan/fluent-plugin-cloudwatch-logs/git/commits{/sha}","comments_url":"https://api.github.com/repos/YPlan/fluent-plugin-cloudwatch-logs/comments{/number}","issue_comment_url":"https://api.github.com/repos/YPlan/fluent-plugin-cloudwatch-logs/issues/comments{/number}","contents_url":"https://api.github.com/repos/YPlan/fluent-plugin-cloudwatch-logs/contents/{+path}","compare_url":"https://api.github.com/repos/YPlan/fluent-plugin-cloudwatch-logs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/YPlan/fluent-plugin-cloudwatch-logs/merges","archive_url":"https://api.github.com/repos/YPlan/fluent-plugin-cloudwatch-logs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/YPlan/fluent-plugin-cloudwatch-logs/downloads","issues_url":"https://api.github.com/repos/YPlan/fluent-plugin-cloudwatch-logs/issues{/number}","pulls_url":"https://api.github.com/repos/YPlan/fluent-plugin-cloudwatch-logs/pulls{/number}","milestones_url":"https://api.github.com/repos/YPlan/fluent-plugin-cloudwatch-logs/milestones{/number}","notifications_url":"https://api.github.com/repos/YPlan/fluent-plugin-cloudwatch-logs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/YPlan/fluent-plugin-cloudwatch-logs/labels{/name}","releases_url":"https://api.github.com/repos/YPlan/fluent-plugin-cloudwatch-logs/releases{/id}","deployments_url":"https://api.github.com/repos/YPlan/fluent-plugin-cloudwatch-logs/deployments","created_at":"2016-06-10T09:57:27Z","updated_at":"2016-06-10T09:57:28Z","pushed_at":"2016-10-14T09:46:27Z","git_url":"git://github.com/YPlan/fluent-plugin-cloudwatch-logs.git","ssh_url":"git@github.com:YPlan/fluent-plugin-cloudwatch-logs.git","clone_url":"https://github.com/YPlan/fluent-plugin-cloudwatch-logs.git","svn_url":"https://github.com/YPlan/fluent-plugin-cloudwatch-logs","homepage":null,"size":93,"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":"ryotarai:master","ref":"master","sha":"80c008cdcd6e7ded1639ad8dd907c15848f012aa","user":{"login":"ryotarai","id":706434,"avatar_url":"https://avatars.githubusercontent.com/u/706434?v=3","gravatar_id":"","url":"https://api.github.com/users/ryotarai","html_url":"https://github.com/ryotarai","followers_url":"https://api.github.com/users/ryotarai/followers","following_url":"https://api.github.com/users/ryotarai/following{/other_user}","gists_url":"https://api.github.com/users/ryotarai/gists{/gist_id}","starred_url":"https://api.github.com/users/ryotarai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryotarai/subscriptions","organizations_url":"https://api.github.com/users/ryotarai/orgs","repos_url":"https://api.github.com/users/ryotarai/repos","events_url":"https://api.github.com/users/ryotarai/events{/privacy}","received_events_url":"https://api.github.com/users/ryotarai/received_events","type":"User","site_admin":false},"repo":{"id":21900872,"name":"fluent-plugin-cloudwatch-logs","full_name":"ryotarai/fluent-plugin-cloudwatch-logs","owner":{"login":"ryotarai","id":706434,"avatar_url":"https://avatars.githubusercontent.com/u/706434?v=3","gravatar_id":"","url":"https://api.github.com/users/ryotarai","html_url":"https://github.com/ryotarai","followers_url":"https://api.github.com/users/ryotarai/followers","following_url":"https://api.github.com/users/ryotarai/following{/other_user}","gists_url":"https://api.github.com/users/ryotarai/gists{/gist_id}","starred_url":"https://api.github.com/users/ryotarai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryotarai/subscriptions","organizations_url":"https://api.github.com/users/ryotarai/orgs","repos_url":"https://api.github.com/users/ryotarai/repos","events_url":"https://api.github.com/users/ryotarai/events{/privacy}","received_events_url":"https://api.github.com/users/ryotarai/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ryotarai/fluent-plugin-cloudwatch-logs","description":"CloudWatch Logs Plugin for Fluentd","fork":false,"url":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs","forks_url":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/forks","keys_url":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/teams","hooks_url":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/hooks","issue_events_url":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/issues/events{/number}","events_url":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/events","assignees_url":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/assignees{/user}","branches_url":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/branches{/branch}","tags_url":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/tags","blobs_url":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/git/refs{/sha}","trees_url":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/statuses/{sha}","languages_url":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/languages","stargazers_url":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/stargazers","contributors_url":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/contributors","subscribers_url":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/subscribers","subscription_url":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/subscription","commits_url":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/commits{/sha}","git_commits_url":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/git/commits{/sha}","comments_url":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/comments{/number}","issue_comment_url":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/issues/comments{/number}","contents_url":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/contents/{+path}","compare_url":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/merges","archive_url":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/downloads","issues_url":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/issues{/number}","pulls_url":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/pulls{/number}","milestones_url":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/milestones{/number}","notifications_url":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/labels{/name}","releases_url":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/releases{/id}","deployments_url":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/deployments","created_at":"2014-07-16T13:07:18Z","updated_at":"2016-10-12T04:00:12Z","pushed_at":"2016-10-14T09:46:28Z","git_url":"git://github.com/ryotarai/fluent-plugin-cloudwatch-logs.git","ssh_url":"git@github.com:ryotarai/fluent-plugin-cloudwatch-logs.git","clone_url":"https://github.com/ryotarai/fluent-plugin-cloudwatch-logs.git","svn_url":"https://github.com/ryotarai/fluent-plugin-cloudwatch-logs","homepage":null,"size":114,"stargazers_count":49,"watchers_count":49,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":37,"mirror_url":null,"open_issues_count":16,"forks":37,"open_issues":16,"watchers":49,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/pulls/49"},"html":{"href":"https://github.com/ryotarai/fluent-plugin-cloudwatch-logs/pull/49"},"issue":{"href":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/issues/49"},"comments":{"href":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/issues/49/comments"},"review_comments":{"href":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/pulls/49/comments"},"review_comment":{"href":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/pulls/49/commits"},"statuses":{"href":"https://api.github.com/repos/ryotarai/fluent-plugin-cloudwatch-logs/statuses/026b6947267cfadfef1a026a61ce14525d6e2cad"}}}}
{"actor":{"display_login":"adamchainz"}}