{"action":"created","comment":{"url":"https://api.github.com/repos/jenkinsci/logstash-plugin/pulls/comments/55786324","id":55786324,"diff_hunk":"@@ -67,7 +76,26 @@ public Environment setUp(AbstractBuild build, Launcher launcher, BuildListener l\n   public OutputStream decorateLogger(AbstractBuild build, OutputStream logger) {\n     LogstashWriter logstash = getLogStashWriter(build, logger);\n \n-    return new LogstashOutputStream(logger, logstash);\n+    LogstashOutputStream los = new LogstashOutputStream(logger, logstash);\n+\n+    if (build.getProject() instanceof BuildableItemWithBuildWrappers) {\n+      BuildableItemWithBuildWrappers project = (BuildableItemWithBuildWrappers) build.getProject();\n+      for (BuildWrapper wrapper: project.getBuildWrappersList()) {\n+        if (wrapper instanceof MaskPasswordsBuildWrapper) {\n+          List<VarPasswordPair> allPasswordPairs = new ArrayList<VarPasswordPair>();\n+\n+          MaskPasswordsBuildWrapper maskPasswordsWrapper = (MaskPasswordsBuildWrapper) wrapper;\n+          allPasswordPairs.addAll(maskPasswordsWrapper.getVarPasswordPairs());\n+\n+          MaskPasswordsConfig config = MaskPasswordsConfig.getInstance();\n+          allPasswordPairs.addAll(config.getGlobalVarPasswordPairs());\n+\n+          return (OutputStream) los.maskPasswords(allPasswordPairs);\n+        }\n+      }\n+    }\n+\n+    return (OutputStream) los;","path":"src/main/java/jenkins/plugins/logstash/LogstashBuildWrapper.java","position":48,"original_position":48,"commit_id":"7119dcf62d00d45f08c374dc16a75837df311981","original_commit_id":"7119dcf62d00d45f08c374dc16a75837df311981","user":{"login":"R-Gerard","id":2788854,"avatar_url":"https://avatars.githubusercontent.com/u/2788854?v=3","gravatar_id":"","url":"https://api.github.com/users/R-Gerard","html_url":"https://github.com/R-Gerard","followers_url":"https://api.github.com/users/R-Gerard/followers","following_url":"https://api.github.com/users/R-Gerard/following{/other_user}","gists_url":"https://api.github.com/users/R-Gerard/gists{/gist_id}","starred_url":"https://api.github.com/users/R-Gerard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/R-Gerard/subscriptions","organizations_url":"https://api.github.com/users/R-Gerard/orgs","repos_url":"https://api.github.com/users/R-Gerard/repos","events_url":"https://api.github.com/users/R-Gerard/events{/privacy}","received_events_url":"https://api.github.com/users/R-Gerard/received_events","type":"User","site_admin":false},"body":"`return los;`","created_at":"2016-03-11T03:39:36Z","updated_at":"2016-03-11T03:39:36Z","html_url":"https://github.com/jenkinsci/logstash-plugin/pull/12#discussion_r55786324","pull_request_url":"https://api.github.com/repos/jenkinsci/logstash-plugin/pulls/12","_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/logstash-plugin/pulls/comments/55786324"},"html":{"href":"https://github.com/jenkinsci/logstash-plugin/pull/12#discussion_r55786324"},"pull_request":{"href":"https://api.github.com/repos/jenkinsci/logstash-plugin/pulls/12"}}},"pull_request":{"url":"https://api.github.com/repos/jenkinsci/logstash-plugin/pulls/12","id":61568200,"html_url":"https://github.com/jenkinsci/logstash-plugin/pull/12","diff_url":"https://github.com/jenkinsci/logstash-plugin/pull/12.diff","patch_url":"https://github.com/jenkinsci/logstash-plugin/pull/12.patch","issue_url":"https://api.github.com/repos/jenkinsci/logstash-plugin/issues/12","number":12,"state":"open","locked":false,"title":"Respect \"Mask Passwords\" Plugin","user":{"login":"rwtsoftware","id":7244171,"avatar_url":"https://avatars.githubusercontent.com/u/7244171?v=3","gravatar_id":"","url":"https://api.github.com/users/rwtsoftware","html_url":"https://github.com/rwtsoftware","followers_url":"https://api.github.com/users/rwtsoftware/followers","following_url":"https://api.github.com/users/rwtsoftware/following{/other_user}","gists_url":"https://api.github.com/users/rwtsoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/rwtsoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwtsoftware/subscriptions","organizations_url":"https://api.github.com/users/rwtsoftware/orgs","repos_url":"https://api.github.com/users/rwtsoftware/repos","events_url":"https://api.github.com/users/rwtsoftware/events{/privacy}","received_events_url":"https://api.github.com/users/rwtsoftware/received_events","type":"User","site_admin":false},"body":"Respect Mask Password plugin configuration\r\nIf there is a mask passwords wrapper associated with this build then:\r\n* Grab password list from the wrapper\r\n* Return `MaskPasswordsOutputStream` decorated with `LogstashOutputStream`","created_at":"2016-03-03T14:41:14Z","updated_at":"2016-03-11T03:39:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"38d02ab0248efb0f8e9e4a9b7b305a3339c3c35a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jenkinsci/logstash-plugin/pulls/12/commits","review_comments_url":"https://api.github.com/repos/jenkinsci/logstash-plugin/pulls/12/comments","review_comment_url":"https://api.github.com/repos/jenkinsci/logstash-plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jenkinsci/logstash-plugin/issues/12/comments","statuses_url":"https://api.github.com/repos/jenkinsci/logstash-plugin/statuses/7119dcf62d00d45f08c374dc16a75837df311981","head":{"label":"rwtsoftware:JENKINS-29762","ref":"JENKINS-29762","sha":"7119dcf62d00d45f08c374dc16a75837df311981","user":{"login":"rwtsoftware","id":7244171,"avatar_url":"https://avatars.githubusercontent.com/u/7244171?v=3","gravatar_id":"","url":"https://api.github.com/users/rwtsoftware","html_url":"https://github.com/rwtsoftware","followers_url":"https://api.github.com/users/rwtsoftware/followers","following_url":"https://api.github.com/users/rwtsoftware/following{/other_user}","gists_url":"https://api.github.com/users/rwtsoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/rwtsoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwtsoftware/subscriptions","organizations_url":"https://api.github.com/users/rwtsoftware/orgs","repos_url":"https://api.github.com/users/rwtsoftware/repos","events_url":"https://api.github.com/users/rwtsoftware/events{/privacy}","received_events_url":"https://api.github.com/users/rwtsoftware/received_events","type":"User","site_admin":false},"repo":{"id":52899247,"name":"logstash-plugin","full_name":"rwtsoftware/logstash-plugin","owner":{"login":"rwtsoftware","id":7244171,"avatar_url":"https://avatars.githubusercontent.com/u/7244171?v=3","gravatar_id":"","url":"https://api.github.com/users/rwtsoftware","html_url":"https://github.com/rwtsoftware","followers_url":"https://api.github.com/users/rwtsoftware/followers","following_url":"https://api.github.com/users/rwtsoftware/following{/other_user}","gists_url":"https://api.github.com/users/rwtsoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/rwtsoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwtsoftware/subscriptions","organizations_url":"https://api.github.com/users/rwtsoftware/orgs","repos_url":"https://api.github.com/users/rwtsoftware/repos","events_url":"https://api.github.com/users/rwtsoftware/events{/privacy}","received_events_url":"https://api.github.com/users/rwtsoftware/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rwtsoftware/logstash-plugin","description":"Jenkins plugin to ship the console log off to Logstash","fork":true,"url":"https://api.github.com/repos/rwtsoftware/logstash-plugin","forks_url":"https://api.github.com/repos/rwtsoftware/logstash-plugin/forks","keys_url":"https://api.github.com/repos/rwtsoftware/logstash-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rwtsoftware/logstash-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rwtsoftware/logstash-plugin/teams","hooks_url":"https://api.github.com/repos/rwtsoftware/logstash-plugin/hooks","issue_events_url":"https://api.github.com/repos/rwtsoftware/logstash-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/rwtsoftware/logstash-plugin/events","assignees_url":"https://api.github.com/repos/rwtsoftware/logstash-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/rwtsoftware/logstash-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/rwtsoftware/logstash-plugin/tags","blobs_url":"https://api.github.com/repos/rwtsoftware/logstash-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rwtsoftware/logstash-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rwtsoftware/logstash-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/rwtsoftware/logstash-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rwtsoftware/logstash-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/rwtsoftware/logstash-plugin/languages","stargazers_url":"https://api.github.com/repos/rwtsoftware/logstash-plugin/stargazers","contributors_url":"https://api.github.com/repos/rwtsoftware/logstash-plugin/contributors","subscribers_url":"https://api.github.com/repos/rwtsoftware/logstash-plugin/subscribers","subscription_url":"https://api.github.com/repos/rwtsoftware/logstash-plugin/subscription","commits_url":"https://api.github.com/repos/rwtsoftware/logstash-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/rwtsoftware/logstash-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/rwtsoftware/logstash-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/rwtsoftware/logstash-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/rwtsoftware/logstash-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/rwtsoftware/logstash-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rwtsoftware/logstash-plugin/merges","archive_url":"https://api.github.com/repos/rwtsoftware/logstash-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rwtsoftware/logstash-plugin/downloads","issues_url":"https://api.github.com/repos/rwtsoftware/logstash-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/rwtsoftware/logstash-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/rwtsoftware/logstash-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/rwtsoftware/logstash-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rwtsoftware/logstash-plugin/labels{/name}","releases_url":"https://api.github.com/repos/rwtsoftware/logstash-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/rwtsoftware/logstash-plugin/deployments","created_at":"2016-03-01T18:19:18Z","updated_at":"2016-03-01T18:19:19Z","pushed_at":"2016-03-11T00:11:42Z","git_url":"git://github.com/rwtsoftware/logstash-plugin.git","ssh_url":"git@github.com:rwtsoftware/logstash-plugin.git","clone_url":"https://github.com/rwtsoftware/logstash-plugin.git","svn_url":"https://github.com/rwtsoftware/logstash-plugin","homepage":null,"size":156,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"jenkinsci:master","ref":"master","sha":"05dc3d978fa2b765b4ae4e4f6c86e80cd982dd26","user":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars.githubusercontent.com/u/107424?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"repo":{"id":7866898,"name":"logstash-plugin","full_name":"jenkinsci/logstash-plugin","owner":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars.githubusercontent.com/u/107424?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jenkinsci/logstash-plugin","description":"Jenkins plugin to ship the console log off to Logstash","fork":true,"url":"https://api.github.com/repos/jenkinsci/logstash-plugin","forks_url":"https://api.github.com/repos/jenkinsci/logstash-plugin/forks","keys_url":"https://api.github.com/repos/jenkinsci/logstash-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jenkinsci/logstash-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jenkinsci/logstash-plugin/teams","hooks_url":"https://api.github.com/repos/jenkinsci/logstash-plugin/hooks","issue_events_url":"https://api.github.com/repos/jenkinsci/logstash-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/jenkinsci/logstash-plugin/events","assignees_url":"https://api.github.com/repos/jenkinsci/logstash-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/jenkinsci/logstash-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/jenkinsci/logstash-plugin/tags","blobs_url":"https://api.github.com/repos/jenkinsci/logstash-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jenkinsci/logstash-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jenkinsci/logstash-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/jenkinsci/logstash-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jenkinsci/logstash-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/jenkinsci/logstash-plugin/languages","stargazers_url":"https://api.github.com/repos/jenkinsci/logstash-plugin/stargazers","contributors_url":"https://api.github.com/repos/jenkinsci/logstash-plugin/contributors","subscribers_url":"https://api.github.com/repos/jenkinsci/logstash-plugin/subscribers","subscription_url":"https://api.github.com/repos/jenkinsci/logstash-plugin/subscription","commits_url":"https://api.github.com/repos/jenkinsci/logstash-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/jenkinsci/logstash-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/jenkinsci/logstash-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/jenkinsci/logstash-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/jenkinsci/logstash-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/jenkinsci/logstash-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jenkinsci/logstash-plugin/merges","archive_url":"https://api.github.com/repos/jenkinsci/logstash-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jenkinsci/logstash-plugin/downloads","issues_url":"https://api.github.com/repos/jenkinsci/logstash-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/jenkinsci/logstash-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/jenkinsci/logstash-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/jenkinsci/logstash-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jenkinsci/logstash-plugin/labels{/name}","releases_url":"https://api.github.com/repos/jenkinsci/logstash-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/jenkinsci/logstash-plugin/deployments","created_at":"2013-01-28T09:38:33Z","updated_at":"2015-12-11T21:38:39Z","pushed_at":"2016-03-11T00:09:14Z","git_url":"git://github.com/jenkinsci/logstash-plugin.git","ssh_url":"git@github.com:jenkinsci/logstash-plugin.git","clone_url":"https://github.com/jenkinsci/logstash-plugin.git","svn_url":"https://github.com/jenkinsci/logstash-plugin","homepage":null,"size":611,"stargazers_count":20,"watchers_count":20,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":3,"forks":14,"open_issues":3,"watchers":20,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/logstash-plugin/pulls/12"},"html":{"href":"https://github.com/jenkinsci/logstash-plugin/pull/12"},"issue":{"href":"https://api.github.com/repos/jenkinsci/logstash-plugin/issues/12"},"comments":{"href":"https://api.github.com/repos/jenkinsci/logstash-plugin/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/jenkinsci/logstash-plugin/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/jenkinsci/logstash-plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jenkinsci/logstash-plugin/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/jenkinsci/logstash-plugin/statuses/7119dcf62d00d45f08c374dc16a75837df311981"}}}}