{"action":"created","comment":{"url":"https://api.github.com/repos/droolsjbpm/drools/pulls/comments/49859256","id":49859256,"diff_hunk":"@@ -0,0 +1,195 @@\n+package org.kie.test.util.logging;\n+\n+/*\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ * http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+import java.util.HashSet;\n+import java.util.Iterator;\n+import java.util.Set;\n+\n+import ch.qos.logback.classic.pattern.EnsureExceptionHandling;\n+import ch.qos.logback.classic.pattern.ExtendedThrowableProxyConverter;\n+import ch.qos.logback.classic.pattern.ThrowableProxyConverter;\n+import ch.qos.logback.classic.spi.ILoggingEvent;\n+import ch.qos.logback.classic.spi.IThrowableProxy;\n+import ch.qos.logback.classic.spi.StackTraceElementProxy;\n+import ch.qos.logback.classic.spi.ThrowableProxyUtil;\n+import ch.qos.logback.core.CoreConstants;\n+import ch.qos.logback.core.pattern.Converter;\n+import ch.qos.logback.core.pattern.ConverterUtil;\n+\n+/**\n+ * An extension of <code>ch.qos.logback.classic.PatternLayout/code> which strips classes under specified packages\n+ * from stack traces.\n+ * </p>\n+ * Sample configuration:\n+ * <pre>\n+ *  &lt;appender name=\"console\" class=\"ch.qos.logback.core.ConsoleAppender\">\n+ *      &lt;layout class=\"org.jbpm.logging.FilteredPatternLayout\">\n+ *          &lt;param name=\"ConversionPattern\" value=\"%-5p  %c %F(%M:%L) %d{dd.MM.yyyy HH:mm:ss}  %m%n\" />\n+ *          &lt;param name=\"Filter\" value=\"org.apache.catalina\" />\n+ *          &lt;param name=\"Filter\" value=\"sun.reflect\" />\n+ *          &lt;param name=\"Filter\" value=\"javax.servlet.http\" />\n+ *      &lt;/layout>\n+ *  &lt;/appender>\n+ * </pre>\n+ *\n+ * Idea and some code copied from original implementation by Fabrizio Giustina\n+ * @see <code>it.openutils.log4j.FilteredPatternLayout</code>\n+ */\n+public class FilteredPatternLayout extends ch.qos.logback.classic.PatternLayout {\n+\n+    /**\n+     * Holds the list of filtered frames.\n+     */\n+    private final Set<String> filteredPackages = new HashSet<String>();\n+\n+    /**\n+     * Adds a new filtered frame. Any stack frame starting with <code>\"at \"</code> + <code>filter</code> will not be\n+     * written to the log.\n+     *\n+     * @param filter a class name or package name to be filtered\n+     */\n+    public void setFilter(String filter) {","path":"kie-test-util/src/main/java/org/kie/test/util/logging/FilteredPatternLayout.java","position":64,"original_position":64,"commit_id":"1faf0aa688828132c39409d5291fed65eb07ee88","original_commit_id":"4f6d0ca333069cd28ecd595840bba866b92e8989","user":{"login":"mrietveld","id":783550,"avatar_url":"https://avatars.githubusercontent.com/u/783550?v=3","gravatar_id":"","url":"https://api.github.com/users/mrietveld","html_url":"https://github.com/mrietveld","followers_url":"https://api.github.com/users/mrietveld/followers","following_url":"https://api.github.com/users/mrietveld/following{/other_user}","gists_url":"https://api.github.com/users/mrietveld/gists{/gist_id}","starred_url":"https://api.github.com/users/mrietveld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrietveld/subscriptions","organizations_url":"https://api.github.com/users/mrietveld/orgs","repos_url":"https://api.github.com/users/mrietveld/repos","events_url":"https://api.github.com/users/mrietveld/events{/privacy}","received_events_url":"https://api.github.com/users/mrietveld/received_events","type":"User","site_admin":false},"body":"Unfortunately, changing the method name breaks the functionality. ","created_at":"2016-01-15T14:39:38Z","updated_at":"2016-01-15T14:39:38Z","html_url":"https://github.com/droolsjbpm/drools/pull/600#discussion_r49859256","pull_request_url":"https://api.github.com/repos/droolsjbpm/drools/pulls/600","_links":{"self":{"href":"https://api.github.com/repos/droolsjbpm/drools/pulls/comments/49859256"},"html":{"href":"https://github.com/droolsjbpm/drools/pull/600#discussion_r49859256"},"pull_request":{"href":"https://api.github.com/repos/droolsjbpm/drools/pulls/600"}}},"pull_request":{"url":"https://api.github.com/repos/droolsjbpm/drools/pulls/600","id":55886904,"html_url":"https://github.com/droolsjbpm/drools/pull/600","diff_url":"https://github.com/droolsjbpm/drools/pull/600.diff","patch_url":"https://github.com/droolsjbpm/drools/pull/600.patch","issue_url":"https://api.github.com/repos/droolsjbpm/drools/issues/600","number":600,"state":"open","locked":false,"title":"kie-test-utils: added (logback) filtered pattern layout","user":{"login":"mrietveld","id":783550,"avatar_url":"https://avatars.githubusercontent.com/u/783550?v=3","gravatar_id":"","url":"https://api.github.com/users/mrietveld","html_url":"https://github.com/mrietveld","followers_url":"https://api.github.com/users/mrietveld/followers","following_url":"https://api.github.com/users/mrietveld/following{/other_user}","gists_url":"https://api.github.com/users/mrietveld/gists{/gist_id}","starred_url":"https://api.github.com/users/mrietveld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrietveld/subscriptions","organizations_url":"https://api.github.com/users/mrietveld/orgs","repos_url":"https://api.github.com/users/mrietveld/repos","events_url":"https://api.github.com/users/mrietveld/events{/privacy}","received_events_url":"https://api.github.com/users/mrietveld/received_events","type":"User","site_admin":false},"body":"This is a class that's been useful to me during development of both GUVNOR-2173 and JBPM-4349. \r\n\r\nNote: this is a class in a _test utility_ jar, so that this module should always be used in a maven test scope, (which thus also applies to any transitive depenencies the module itself has as well). ","created_at":"2016-01-13T11:45:18Z","updated_at":"2016-01-15T14:39:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"96dd2083dd7c52dfa45de38ddeb55a8c3ecc249b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/droolsjbpm/drools/pulls/600/commits","review_comments_url":"https://api.github.com/repos/droolsjbpm/drools/pulls/600/comments","review_comment_url":"https://api.github.com/repos/droolsjbpm/drools/pulls/comments{/number}","comments_url":"https://api.github.com/repos/droolsjbpm/drools/issues/600/comments","statuses_url":"https://api.github.com/repos/droolsjbpm/drools/statuses/1faf0aa688828132c39409d5291fed65eb07ee88","head":{"label":"mrietveld:pr-test-util-filtered-layout","ref":"pr-test-util-filtered-layout","sha":"1faf0aa688828132c39409d5291fed65eb07ee88","user":{"login":"mrietveld","id":783550,"avatar_url":"https://avatars.githubusercontent.com/u/783550?v=3","gravatar_id":"","url":"https://api.github.com/users/mrietveld","html_url":"https://github.com/mrietveld","followers_url":"https://api.github.com/users/mrietveld/followers","following_url":"https://api.github.com/users/mrietveld/following{/other_user}","gists_url":"https://api.github.com/users/mrietveld/gists{/gist_id}","starred_url":"https://api.github.com/users/mrietveld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrietveld/subscriptions","organizations_url":"https://api.github.com/users/mrietveld/orgs","repos_url":"https://api.github.com/users/mrietveld/repos","events_url":"https://api.github.com/users/mrietveld/events{/privacy}","received_events_url":"https://api.github.com/users/mrietveld/received_events","type":"User","site_admin":false},"repo":{"id":2085924,"name":"drools","full_name":"mrietveld/drools","owner":{"login":"mrietveld","id":783550,"avatar_url":"https://avatars.githubusercontent.com/u/783550?v=3","gravatar_id":"","url":"https://api.github.com/users/mrietveld","html_url":"https://github.com/mrietveld","followers_url":"https://api.github.com/users/mrietveld/followers","following_url":"https://api.github.com/users/mrietveld/following{/other_user}","gists_url":"https://api.github.com/users/mrietveld/gists{/gist_id}","starred_url":"https://api.github.com/users/mrietveld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrietveld/subscriptions","organizations_url":"https://api.github.com/users/mrietveld/orgs","repos_url":"https://api.github.com/users/mrietveld/repos","events_url":"https://api.github.com/users/mrietveld/events{/privacy}","received_events_url":"https://api.github.com/users/mrietveld/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mrietveld/drools","description":"Drools Expert is the rule engine and Drools Fusion does complex event processing (CEP).","fork":true,"url":"https://api.github.com/repos/mrietveld/drools","forks_url":"https://api.github.com/repos/mrietveld/drools/forks","keys_url":"https://api.github.com/repos/mrietveld/drools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mrietveld/drools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mrietveld/drools/teams","hooks_url":"https://api.github.com/repos/mrietveld/drools/hooks","issue_events_url":"https://api.github.com/repos/mrietveld/drools/issues/events{/number}","events_url":"https://api.github.com/repos/mrietveld/drools/events","assignees_url":"https://api.github.com/repos/mrietveld/drools/assignees{/user}","branches_url":"https://api.github.com/repos/mrietveld/drools/branches{/branch}","tags_url":"https://api.github.com/repos/mrietveld/drools/tags","blobs_url":"https://api.github.com/repos/mrietveld/drools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mrietveld/drools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mrietveld/drools/git/refs{/sha}","trees_url":"https://api.github.com/repos/mrietveld/drools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mrietveld/drools/statuses/{sha}","languages_url":"https://api.github.com/repos/mrietveld/drools/languages","stargazers_url":"https://api.github.com/repos/mrietveld/drools/stargazers","contributors_url":"https://api.github.com/repos/mrietveld/drools/contributors","subscribers_url":"https://api.github.com/repos/mrietveld/drools/subscribers","subscription_url":"https://api.github.com/repos/mrietveld/drools/subscription","commits_url":"https://api.github.com/repos/mrietveld/drools/commits{/sha}","git_commits_url":"https://api.github.com/repos/mrietveld/drools/git/commits{/sha}","comments_url":"https://api.github.com/repos/mrietveld/drools/comments{/number}","issue_comment_url":"https://api.github.com/repos/mrietveld/drools/issues/comments{/number}","contents_url":"https://api.github.com/repos/mrietveld/drools/contents/{+path}","compare_url":"https://api.github.com/repos/mrietveld/drools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mrietveld/drools/merges","archive_url":"https://api.github.com/repos/mrietveld/drools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mrietveld/drools/downloads","issues_url":"https://api.github.com/repos/mrietveld/drools/issues{/number}","pulls_url":"https://api.github.com/repos/mrietveld/drools/pulls{/number}","milestones_url":"https://api.github.com/repos/mrietveld/drools/milestones{/number}","notifications_url":"https://api.github.com/repos/mrietveld/drools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mrietveld/drools/labels{/name}","releases_url":"https://api.github.com/repos/mrietveld/drools/releases{/id}","created_at":"2011-07-21T21:53:00Z","updated_at":"2014-05-16T18:09:22Z","pushed_at":"2016-01-15T14:39:14Z","git_url":"git://github.com/mrietveld/drools.git","ssh_url":"git@github.com:mrietveld/drools.git","clone_url":"https://github.com/mrietveld/drools.git","svn_url":"https://github.com/mrietveld/drools","homepage":"http://www.jboss.org/drools","size":135039,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"droolsjbpm:master","ref":"master","sha":"110314f44ed87bce061fe1e4416815dbc7836e44","user":{"login":"droolsjbpm","id":517980,"avatar_url":"https://avatars.githubusercontent.com/u/517980?v=3","gravatar_id":"","url":"https://api.github.com/users/droolsjbpm","html_url":"https://github.com/droolsjbpm","followers_url":"https://api.github.com/users/droolsjbpm/followers","following_url":"https://api.github.com/users/droolsjbpm/following{/other_user}","gists_url":"https://api.github.com/users/droolsjbpm/gists{/gist_id}","starred_url":"https://api.github.com/users/droolsjbpm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/droolsjbpm/subscriptions","organizations_url":"https://api.github.com/users/droolsjbpm/orgs","repos_url":"https://api.github.com/users/droolsjbpm/repos","events_url":"https://api.github.com/users/droolsjbpm/events{/privacy}","received_events_url":"https://api.github.com/users/droolsjbpm/received_events","type":"Organization","site_admin":false},"repo":{"id":1381673,"name":"drools","full_name":"droolsjbpm/drools","owner":{"login":"droolsjbpm","id":517980,"avatar_url":"https://avatars.githubusercontent.com/u/517980?v=3","gravatar_id":"","url":"https://api.github.com/users/droolsjbpm","html_url":"https://github.com/droolsjbpm","followers_url":"https://api.github.com/users/droolsjbpm/followers","following_url":"https://api.github.com/users/droolsjbpm/following{/other_user}","gists_url":"https://api.github.com/users/droolsjbpm/gists{/gist_id}","starred_url":"https://api.github.com/users/droolsjbpm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/droolsjbpm/subscriptions","organizations_url":"https://api.github.com/users/droolsjbpm/orgs","repos_url":"https://api.github.com/users/droolsjbpm/repos","events_url":"https://api.github.com/users/droolsjbpm/events{/privacy}","received_events_url":"https://api.github.com/users/droolsjbpm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/droolsjbpm/drools","description":"Drools Expert is the rule engine and Drools Fusion does complex event processing (CEP).","fork":false,"url":"https://api.github.com/repos/droolsjbpm/drools","forks_url":"https://api.github.com/repos/droolsjbpm/drools/forks","keys_url":"https://api.github.com/repos/droolsjbpm/drools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/droolsjbpm/drools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/droolsjbpm/drools/teams","hooks_url":"https://api.github.com/repos/droolsjbpm/drools/hooks","issue_events_url":"https://api.github.com/repos/droolsjbpm/drools/issues/events{/number}","events_url":"https://api.github.com/repos/droolsjbpm/drools/events","assignees_url":"https://api.github.com/repos/droolsjbpm/drools/assignees{/user}","branches_url":"https://api.github.com/repos/droolsjbpm/drools/branches{/branch}","tags_url":"https://api.github.com/repos/droolsjbpm/drools/tags","blobs_url":"https://api.github.com/repos/droolsjbpm/drools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/droolsjbpm/drools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/droolsjbpm/drools/git/refs{/sha}","trees_url":"https://api.github.com/repos/droolsjbpm/drools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/droolsjbpm/drools/statuses/{sha}","languages_url":"https://api.github.com/repos/droolsjbpm/drools/languages","stargazers_url":"https://api.github.com/repos/droolsjbpm/drools/stargazers","contributors_url":"https://api.github.com/repos/droolsjbpm/drools/contributors","subscribers_url":"https://api.github.com/repos/droolsjbpm/drools/subscribers","subscription_url":"https://api.github.com/repos/droolsjbpm/drools/subscription","commits_url":"https://api.github.com/repos/droolsjbpm/drools/commits{/sha}","git_commits_url":"https://api.github.com/repos/droolsjbpm/drools/git/commits{/sha}","comments_url":"https://api.github.com/repos/droolsjbpm/drools/comments{/number}","issue_comment_url":"https://api.github.com/repos/droolsjbpm/drools/issues/comments{/number}","contents_url":"https://api.github.com/repos/droolsjbpm/drools/contents/{+path}","compare_url":"https://api.github.com/repos/droolsjbpm/drools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/droolsjbpm/drools/merges","archive_url":"https://api.github.com/repos/droolsjbpm/drools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/droolsjbpm/drools/downloads","issues_url":"https://api.github.com/repos/droolsjbpm/drools/issues{/number}","pulls_url":"https://api.github.com/repos/droolsjbpm/drools/pulls{/number}","milestones_url":"https://api.github.com/repos/droolsjbpm/drools/milestones{/number}","notifications_url":"https://api.github.com/repos/droolsjbpm/drools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/droolsjbpm/drools/labels{/name}","releases_url":"https://api.github.com/repos/droolsjbpm/drools/releases{/id}","created_at":"2011-02-18T08:37:05Z","updated_at":"2016-01-13T04:56:18Z","pushed_at":"2016-01-15T14:39:15Z","git_url":"git://github.com/droolsjbpm/drools.git","ssh_url":"git@github.com:droolsjbpm/drools.git","clone_url":"https://github.com/droolsjbpm/drools.git","svn_url":"https://github.com/droolsjbpm/drools","homepage":"http://www.drools.org","size":237020,"stargazers_count":525,"watchers_count":525,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":753,"mirror_url":null,"open_issues_count":7,"forks":753,"open_issues":7,"watchers":525,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/droolsjbpm/drools/pulls/600"},"html":{"href":"https://github.com/droolsjbpm/drools/pull/600"},"issue":{"href":"https://api.github.com/repos/droolsjbpm/drools/issues/600"},"comments":{"href":"https://api.github.com/repos/droolsjbpm/drools/issues/600/comments"},"review_comments":{"href":"https://api.github.com/repos/droolsjbpm/drools/pulls/600/comments"},"review_comment":{"href":"https://api.github.com/repos/droolsjbpm/drools/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/droolsjbpm/drools/pulls/600/commits"},"statuses":{"href":"https://api.github.com/repos/droolsjbpm/drools/statuses/1faf0aa688828132c39409d5291fed65eb07ee88"}}}}