{"action":"created","comment":{"url":"https://api.github.com/repos/fluent/fluentd/pulls/comments/58333352","id":58333352,"diff_hunk":"@@ -281,6 +284,7 @@ def event(level, args)\n       }\n \n       map.each_pair {|k,v|\n+        next if (k.to_s == \"plugin_type\" || k.to_s == \"plugin_id\") and @optional_header","path":"lib/fluent/log.rb","position":null,"original_position":32,"commit_id":"78b46bcabdbd17ee52730f95f08fdac42085ab5e","original_commit_id":"b3b8e14e27ef373c293e09b7fc05af6e0415953f","user":{"login":"tagomoris","id":230654,"avatar_url":"https://avatars.githubusercontent.com/u/230654?v=3","gravatar_id":"","url":"https://api.github.com/users/tagomoris","html_url":"https://github.com/tagomoris","followers_url":"https://api.github.com/users/tagomoris/followers","following_url":"https://api.github.com/users/tagomoris/following{/other_user}","gists_url":"https://api.github.com/users/tagomoris/gists{/gist_id}","starred_url":"https://api.github.com/users/tagomoris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tagomoris/subscriptions","organizations_url":"https://api.github.com/users/tagomoris/orgs","repos_url":"https://api.github.com/users/tagomoris/repos","events_url":"https://api.github.com/users/tagomoris/events{/privacy}","received_events_url":"https://api.github.com/users/tagomoris/received_events","type":"User","site_admin":false},"body":"It's very exceptional case, isn't it?\r\nIf you want to remove it even in `RootAgent#shutdown`, you can remove these attributes from `root_agent.rb`.","created_at":"2016-04-04T06:44:04Z","updated_at":"2016-04-04T06:44:04Z","html_url":"https://github.com/fluent/fluentd/pull/860#discussion_r58333352","pull_request_url":"https://api.github.com/repos/fluent/fluentd/pulls/860","_links":{"self":{"href":"https://api.github.com/repos/fluent/fluentd/pulls/comments/58333352"},"html":{"href":"https://github.com/fluent/fluentd/pull/860#discussion_r58333352"},"pull_request":{"href":"https://api.github.com/repos/fluent/fluentd/pulls/860"}}},"pull_request":{"url":"https://api.github.com/repos/fluent/fluentd/pulls/860","id":63330183,"html_url":"https://github.com/fluent/fluentd/pull/860","diff_url":"https://github.com/fluent/fluentd/pull/860.diff","patch_url":"https://github.com/fluent/fluentd/pull/860.patch","issue_url":"https://api.github.com/repos/fluent/fluentd/issues/860","number":860,"state":"open","locked":false,"title":"Append plugin name and id to log","user":{"login":"cosmo0920","id":700876,"avatar_url":"https://avatars.githubusercontent.com/u/700876?v=3","gravatar_id":"","url":"https://api.github.com/users/cosmo0920","html_url":"https://github.com/cosmo0920","followers_url":"https://api.github.com/users/cosmo0920/followers","following_url":"https://api.github.com/users/cosmo0920/following{/other_user}","gists_url":"https://api.github.com/users/cosmo0920/gists{/gist_id}","starred_url":"https://api.github.com/users/cosmo0920/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cosmo0920/subscriptions","organizations_url":"https://api.github.com/users/cosmo0920/orgs","repos_url":"https://api.github.com/users/cosmo0920/repos","events_url":"https://api.github.com/users/cosmo0920/events{/privacy}","received_events_url":"https://api.github.com/users/cosmo0920/received_events","type":"User","site_admin":false},"body":"If users use following config:\r\n\r\n```log\r\n<source>\r\n  type forward\r\n  @id hoge\r\n  log_level debug\r\n</source>\r\n<match test>\r\n  type stdout\r\n  @id test\r\n  log_level debug\r\n</match>\r\n```\r\n\r\nFluentd outputs following log which includes optional headers:\r\n\r\n```log\r\n2016-03-18 14:00:55 +0900 [info]: fluent/supervisor.rb:518:read_config: reading config file path=\"example/in_forward.conf\"\r\n2016-03-18 14:00:55 +0900 [info]: fluent/supervisor.rb:351:supervise: starting fluentd-0.14.0.pre.1\r\n2016-03-18 14:00:55 +0900 [info]: fluent/engine.rb:117:block in configure: gem 'fluentd' version '0.14.0.pre.1'\r\n2016-03-18 14:00:55 +0900 [info]: fluent/agent.rb:128:add_match: adding match pattern=\"test\" type=\"stdout\"\r\n2016-03-18 14:00:55 +0900 [info]: fluent/root_agent.rb:147:add_source: [Fluent::StdoutOutput(test)] adding source plugin_type=\"Fluent::StdoutOutput\" plugin_id=\"test\" type=\"forward\"\r\n2016-03-18 14:00:55 +0900 [info]: fluent/engine.rb:124:configure: [Fluent::ForwardInput(hoge)] using configuration file: <ROOT>\r\n  <source>\r\n    type forward\r\n    @id hoge\r\n    log_level debug\r\n  </source>\r\n  <match test>\r\n    type stdout\r\n    @id test\r\n    log_level debug\r\n  </match>\r\n</ROOT> plugin_type=\"Fluent::ForwardInput\" plugin_id=\"hoge\"\r\n2016-03-18 14:00:55 +0900 [info]: plugin/in_forward.rb:88:listen: [Fluent::ForwardInput(hoge)] listening fluent socket on 0.0.0.0:24224 plugin_type=\"Fluent::ForwardInput\" plugin_id=\"hoge\"\r\n^C2016-03-18 14:01:03 +0900 [debug]: fluent/supervisor.rb:431:block in install_supervisor_signal_handlers: fluentd supervisor process get SIGINT\r\n2016-03-18 14:01:03 +0900 [debug]: fluent/supervisor.rb:576:block in install_main_process_signal_handlers: [Fluent::ForwardInput(hoge)] fluentd main process get SIGINT plugin_type=\"Fluent::ForwardInput\" plugin_id=\"hoge\"\r\n2016-03-18 14:01:03 +0900 [debug]: fluent/supervisor.rb:580:block in install_main_process_signal_handlers: [Fluent::ForwardInput(hoge)] getting start to shutdown main process plugin_type=\"Fluent::ForwardInput\" plugin_id=\"hoge\"\r\n2016-03-18 14:01:03 +0900 [debug]: fluent/supervisor.rb:576:block in install_main_process_signal_handlers: [Fluent::ForwardInput(hoge)] fluentd main process get SIGINT plugin_type=\"Fluent::ForwardInput\" plugin_id=\"hoge\"\r\n2016-03-18 14:01:03 +0900 [info]: fluent/engine.rb:202:run: [Fluent::ForwardInput(hoge)] shutting down fluentd plugin_type=\"Fluent::ForwardInput\" plugin_id=\"hoge\"\r\n2016-03-18 14:01:03 +0900 [info]: fluent/root_agent.rb:125:block (2 levels) in shutdown: [Fluent::ForwardInput(hoge)] shutting down input plugin_type=\"Fluent::ForwardInput\" plugin_id=\"hoge\" type=:forward\r\n2016-03-18 14:01:03 +0900 [info]: fluent/agent.rb:98:block (2 levels) in shutdown: [Fluent::ForwardInput(hoge)] shutting down output plugin_type=\"Fluent::ForwardInput\" plugin_id=\"test\" type=:stdout\r\n2016-03-18 14:01:03 +0900 [info]: fluent/supervisor.rb:388:supervise: process finished code=0\r\n```","created_at":"2016-03-18T05:38:14Z","updated_at":"2016-04-04T06:44:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1484e8d662632adf2c34b94af35bb41e1caed0e5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/fluent/fluentd/pulls/860/commits","review_comments_url":"https://api.github.com/repos/fluent/fluentd/pulls/860/comments","review_comment_url":"https://api.github.com/repos/fluent/fluentd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fluent/fluentd/issues/860/comments","statuses_url":"https://api.github.com/repos/fluent/fluentd/statuses/78b46bcabdbd17ee52730f95f08fdac42085ab5e","head":{"label":"cosmo0920:append-plugin-name-and-id-to-log","ref":"append-plugin-name-and-id-to-log","sha":"78b46bcabdbd17ee52730f95f08fdac42085ab5e","user":{"login":"cosmo0920","id":700876,"avatar_url":"https://avatars.githubusercontent.com/u/700876?v=3","gravatar_id":"","url":"https://api.github.com/users/cosmo0920","html_url":"https://github.com/cosmo0920","followers_url":"https://api.github.com/users/cosmo0920/followers","following_url":"https://api.github.com/users/cosmo0920/following{/other_user}","gists_url":"https://api.github.com/users/cosmo0920/gists{/gist_id}","starred_url":"https://api.github.com/users/cosmo0920/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cosmo0920/subscriptions","organizations_url":"https://api.github.com/users/cosmo0920/orgs","repos_url":"https://api.github.com/users/cosmo0920/repos","events_url":"https://api.github.com/users/cosmo0920/events{/privacy}","received_events_url":"https://api.github.com/users/cosmo0920/received_events","type":"User","site_admin":false},"repo":{"id":39881220,"name":"fluentd","full_name":"cosmo0920/fluentd","owner":{"login":"cosmo0920","id":700876,"avatar_url":"https://avatars.githubusercontent.com/u/700876?v=3","gravatar_id":"","url":"https://api.github.com/users/cosmo0920","html_url":"https://github.com/cosmo0920","followers_url":"https://api.github.com/users/cosmo0920/followers","following_url":"https://api.github.com/users/cosmo0920/following{/other_user}","gists_url":"https://api.github.com/users/cosmo0920/gists{/gist_id}","starred_url":"https://api.github.com/users/cosmo0920/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cosmo0920/subscriptions","organizations_url":"https://api.github.com/users/cosmo0920/orgs","repos_url":"https://api.github.com/users/cosmo0920/repos","events_url":"https://api.github.com/users/cosmo0920/events{/privacy}","received_events_url":"https://api.github.com/users/cosmo0920/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cosmo0920/fluentd","description":"Fluentd data collector","fork":true,"url":"https://api.github.com/repos/cosmo0920/fluentd","forks_url":"https://api.github.com/repos/cosmo0920/fluentd/forks","keys_url":"https://api.github.com/repos/cosmo0920/fluentd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cosmo0920/fluentd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cosmo0920/fluentd/teams","hooks_url":"https://api.github.com/repos/cosmo0920/fluentd/hooks","issue_events_url":"https://api.github.com/repos/cosmo0920/fluentd/issues/events{/number}","events_url":"https://api.github.com/repos/cosmo0920/fluentd/events","assignees_url":"https://api.github.com/repos/cosmo0920/fluentd/assignees{/user}","branches_url":"https://api.github.com/repos/cosmo0920/fluentd/branches{/branch}","tags_url":"https://api.github.com/repos/cosmo0920/fluentd/tags","blobs_url":"https://api.github.com/repos/cosmo0920/fluentd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cosmo0920/fluentd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cosmo0920/fluentd/git/refs{/sha}","trees_url":"https://api.github.com/repos/cosmo0920/fluentd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cosmo0920/fluentd/statuses/{sha}","languages_url":"https://api.github.com/repos/cosmo0920/fluentd/languages","stargazers_url":"https://api.github.com/repos/cosmo0920/fluentd/stargazers","contributors_url":"https://api.github.com/repos/cosmo0920/fluentd/contributors","subscribers_url":"https://api.github.com/repos/cosmo0920/fluentd/subscribers","subscription_url":"https://api.github.com/repos/cosmo0920/fluentd/subscription","commits_url":"https://api.github.com/repos/cosmo0920/fluentd/commits{/sha}","git_commits_url":"https://api.github.com/repos/cosmo0920/fluentd/git/commits{/sha}","comments_url":"https://api.github.com/repos/cosmo0920/fluentd/comments{/number}","issue_comment_url":"https://api.github.com/repos/cosmo0920/fluentd/issues/comments{/number}","contents_url":"https://api.github.com/repos/cosmo0920/fluentd/contents/{+path}","compare_url":"https://api.github.com/repos/cosmo0920/fluentd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cosmo0920/fluentd/merges","archive_url":"https://api.github.com/repos/cosmo0920/fluentd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cosmo0920/fluentd/downloads","issues_url":"https://api.github.com/repos/cosmo0920/fluentd/issues{/number}","pulls_url":"https://api.github.com/repos/cosmo0920/fluentd/pulls{/number}","milestones_url":"https://api.github.com/repos/cosmo0920/fluentd/milestones{/number}","notifications_url":"https://api.github.com/repos/cosmo0920/fluentd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cosmo0920/fluentd/labels{/name}","releases_url":"https://api.github.com/repos/cosmo0920/fluentd/releases{/id}","deployments_url":"https://api.github.com/repos/cosmo0920/fluentd/deployments","created_at":"2015-07-29T08:00:13Z","updated_at":"2016-02-17T01:14:17Z","pushed_at":"2016-04-04T06:29:33Z","git_url":"git://github.com/cosmo0920/fluentd.git","ssh_url":"git@github.com:cosmo0920/fluentd.git","clone_url":"https://github.com/cosmo0920/fluentd.git","svn_url":"https://github.com/cosmo0920/fluentd","homepage":"http://www.fluentd.org/","size":14036,"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":"fluent:master","ref":"master","sha":"06f5a3e010321c9ac24b8fdddd2e2f5cb0b0602a","user":{"login":"fluent","id":859518,"avatar_url":"https://avatars.githubusercontent.com/u/859518?v=3","gravatar_id":"","url":"https://api.github.com/users/fluent","html_url":"https://github.com/fluent","followers_url":"https://api.github.com/users/fluent/followers","following_url":"https://api.github.com/users/fluent/following{/other_user}","gists_url":"https://api.github.com/users/fluent/gists{/gist_id}","starred_url":"https://api.github.com/users/fluent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fluent/subscriptions","organizations_url":"https://api.github.com/users/fluent/orgs","repos_url":"https://api.github.com/users/fluent/repos","events_url":"https://api.github.com/users/fluent/events{/privacy}","received_events_url":"https://api.github.com/users/fluent/received_events","type":"Organization","site_admin":false},"repo":{"id":1918677,"name":"fluentd","full_name":"fluent/fluentd","owner":{"login":"fluent","id":859518,"avatar_url":"https://avatars.githubusercontent.com/u/859518?v=3","gravatar_id":"","url":"https://api.github.com/users/fluent","html_url":"https://github.com/fluent","followers_url":"https://api.github.com/users/fluent/followers","following_url":"https://api.github.com/users/fluent/following{/other_user}","gists_url":"https://api.github.com/users/fluent/gists{/gist_id}","starred_url":"https://api.github.com/users/fluent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fluent/subscriptions","organizations_url":"https://api.github.com/users/fluent/orgs","repos_url":"https://api.github.com/users/fluent/repos","events_url":"https://api.github.com/users/fluent/events{/privacy}","received_events_url":"https://api.github.com/users/fluent/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fluent/fluentd","description":"Fluentd data collector","fork":false,"url":"https://api.github.com/repos/fluent/fluentd","forks_url":"https://api.github.com/repos/fluent/fluentd/forks","keys_url":"https://api.github.com/repos/fluent/fluentd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fluent/fluentd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fluent/fluentd/teams","hooks_url":"https://api.github.com/repos/fluent/fluentd/hooks","issue_events_url":"https://api.github.com/repos/fluent/fluentd/issues/events{/number}","events_url":"https://api.github.com/repos/fluent/fluentd/events","assignees_url":"https://api.github.com/repos/fluent/fluentd/assignees{/user}","branches_url":"https://api.github.com/repos/fluent/fluentd/branches{/branch}","tags_url":"https://api.github.com/repos/fluent/fluentd/tags","blobs_url":"https://api.github.com/repos/fluent/fluentd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fluent/fluentd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fluent/fluentd/git/refs{/sha}","trees_url":"https://api.github.com/repos/fluent/fluentd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fluent/fluentd/statuses/{sha}","languages_url":"https://api.github.com/repos/fluent/fluentd/languages","stargazers_url":"https://api.github.com/repos/fluent/fluentd/stargazers","contributors_url":"https://api.github.com/repos/fluent/fluentd/contributors","subscribers_url":"https://api.github.com/repos/fluent/fluentd/subscribers","subscription_url":"https://api.github.com/repos/fluent/fluentd/subscription","commits_url":"https://api.github.com/repos/fluent/fluentd/commits{/sha}","git_commits_url":"https://api.github.com/repos/fluent/fluentd/git/commits{/sha}","comments_url":"https://api.github.com/repos/fluent/fluentd/comments{/number}","issue_comment_url":"https://api.github.com/repos/fluent/fluentd/issues/comments{/number}","contents_url":"https://api.github.com/repos/fluent/fluentd/contents/{+path}","compare_url":"https://api.github.com/repos/fluent/fluentd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fluent/fluentd/merges","archive_url":"https://api.github.com/repos/fluent/fluentd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fluent/fluentd/downloads","issues_url":"https://api.github.com/repos/fluent/fluentd/issues{/number}","pulls_url":"https://api.github.com/repos/fluent/fluentd/pulls{/number}","milestones_url":"https://api.github.com/repos/fluent/fluentd/milestones{/number}","notifications_url":"https://api.github.com/repos/fluent/fluentd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fluent/fluentd/labels{/name}","releases_url":"https://api.github.com/repos/fluent/fluentd/releases{/id}","deployments_url":"https://api.github.com/repos/fluent/fluentd/deployments","created_at":"2011-06-19T08:41:40Z","updated_at":"2016-04-04T03:15:43Z","pushed_at":"2016-04-04T06:29:33Z","git_url":"git://github.com/fluent/fluentd.git","ssh_url":"git@github.com:fluent/fluentd.git","clone_url":"https://github.com/fluent/fluentd.git","svn_url":"https://github.com/fluent/fluentd","homepage":"http://www.fluentd.org/","size":14710,"stargazers_count":3952,"watchers_count":3952,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":460,"mirror_url":null,"open_issues_count":59,"forks":460,"open_issues":59,"watchers":3952,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fluent/fluentd/pulls/860"},"html":{"href":"https://github.com/fluent/fluentd/pull/860"},"issue":{"href":"https://api.github.com/repos/fluent/fluentd/issues/860"},"comments":{"href":"https://api.github.com/repos/fluent/fluentd/issues/860/comments"},"review_comments":{"href":"https://api.github.com/repos/fluent/fluentd/pulls/860/comments"},"review_comment":{"href":"https://api.github.com/repos/fluent/fluentd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fluent/fluentd/pulls/860/commits"},"statuses":{"href":"https://api.github.com/repos/fluent/fluentd/statuses/78b46bcabdbd17ee52730f95f08fdac42085ab5e"}}}}