{"action":"created","comment":{"url":"https://api.github.com/repos/apache/lucene-solr/pulls/comments/176802032","pull_request_review_id":106575389,"id":176802032,"diff_hunk":"@@ -0,0 +1,72 @@\n+/*\n+ * Licensed to the Apache Software Foundation (ASF) under one or more\n+ * contributor license agreements.  See the NOTICE file distributed with\n+ * this work for additional information regarding copyright ownership.\n+ * The ASF licenses this file to You under the Apache License, Version 2.0\n+ * (the \"License\"); you may not use this file except in compliance with\n+ * the License.  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+package org.apache.solr.security;\n+\n+import java.io.IOException;\n+import java.lang.invoke.MethodHandles;\n+import java.util.Map;\n+\n+import org.slf4j.Logger;\n+import org.slf4j.LoggerFactory;\n+\n+/**\n+ * Audit logger that writes to the Solr log\n+ * @lucene.experimental\n+ */\n+public class SolrLogAuditLoggerPlugin extends AuditLoggerPlugin {\n+  private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());\n+\n+  /**\n+   * Initialize the plugin from security.json\n+   * @param pluginConfig the config for the plugin\n+   */\n+  @Override\n+  public void init(Map<String, Object> pluginConfig) {\n+    super.init(pluginConfig);\n+    setFormatter(event ->\n+        \"type='\" + event.getEventType().name() + '\\'' +","path":"solr/core/src/java/org/apache/solr/security/SolrLogAuditLoggerPlugin.java","position":41,"original_position":41,"commit_id":"07b4b3947ee67a1742686c514e0784a8ff4db51a","original_commit_id":"07b4b3947ee67a1742686c514e0784a8ff4db51a","user":{"login":"janhoy","id":409128,"avatar_url":"https://avatars0.githubusercontent.com/u/409128?v=4","gravatar_id":"","url":"https://api.github.com/users/janhoy","html_url":"https://github.com/janhoy","followers_url":"https://api.github.com/users/janhoy/followers","following_url":"https://api.github.com/users/janhoy/following{/other_user}","gists_url":"https://api.github.com/users/janhoy/gists{/gist_id}","starred_url":"https://api.github.com/users/janhoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janhoy/subscriptions","organizations_url":"https://api.github.com/users/janhoy/orgs","repos_url":"https://api.github.com/users/janhoy/repos","events_url":"https://api.github.com/users/janhoy/events{/privacy}","received_events_url":"https://api.github.com/users/janhoy/received_events","type":"User","site_admin":false},"body":"Agree","created_at":"2018-03-23T17:04:36Z","updated_at":"2018-03-23T17:04:36Z","html_url":"https://github.com/apache/lucene-solr/pull/342#discussion_r176802032","pull_request_url":"https://api.github.com/repos/apache/lucene-solr/pulls/342","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/apache/lucene-solr/pulls/comments/176802032"},"html":{"href":"https://github.com/apache/lucene-solr/pull/342#discussion_r176802032"},"pull_request":{"href":"https://api.github.com/repos/apache/lucene-solr/pulls/342"}},"in_reply_to_id":176735905},"pull_request":{"url":"https://api.github.com/repos/apache/lucene-solr/pulls/342","id":177045323,"html_url":"https://github.com/apache/lucene-solr/pull/342","diff_url":"https://github.com/apache/lucene-solr/pull/342.diff","patch_url":"https://github.com/apache/lucene-solr/pull/342.patch","issue_url":"https://api.github.com/repos/apache/lucene-solr/issues/342","number":342,"state":"open","locked":false,"title":" SOLR-12120: New AuditLoggerPlugin type allowing custom Audit logger plugin","user":{"login":"janhoy","id":409128,"avatar_url":"https://avatars0.githubusercontent.com/u/409128?v=4","gravatar_id":"","url":"https://api.github.com/users/janhoy","html_url":"https://github.com/janhoy","followers_url":"https://api.github.com/users/janhoy/followers","following_url":"https://api.github.com/users/janhoy/following{/other_user}","gists_url":"https://api.github.com/users/janhoy/gists{/gist_id}","starred_url":"https://api.github.com/users/janhoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janhoy/subscriptions","organizations_url":"https://api.github.com/users/janhoy/orgs","repos_url":"https://api.github.com/users/janhoy/repos","events_url":"https://api.github.com/users/janhoy/events{/privacy}","received_events_url":"https://api.github.com/users/janhoy/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-03-23T11:43:08Z","updated_at":"2018-03-23T17:04:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ada6df7353c5adab12fe6685a5b7806a541fa3ba","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/lucene-solr/pulls/342/commits","review_comments_url":"https://api.github.com/repos/apache/lucene-solr/pulls/342/comments","review_comment_url":"https://api.github.com/repos/apache/lucene-solr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/lucene-solr/issues/342/comments","statuses_url":"https://api.github.com/repos/apache/lucene-solr/statuses/07b4b3947ee67a1742686c514e0784a8ff4db51a","head":{"label":"cominvent:solr12120-auditlogger","ref":"solr12120-auditlogger","sha":"07b4b3947ee67a1742686c514e0784a8ff4db51a","user":{"login":"cominvent","id":1312200,"avatar_url":"https://avatars3.githubusercontent.com/u/1312200?v=4","gravatar_id":"","url":"https://api.github.com/users/cominvent","html_url":"https://github.com/cominvent","followers_url":"https://api.github.com/users/cominvent/followers","following_url":"https://api.github.com/users/cominvent/following{/other_user}","gists_url":"https://api.github.com/users/cominvent/gists{/gist_id}","starred_url":"https://api.github.com/users/cominvent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cominvent/subscriptions","organizations_url":"https://api.github.com/users/cominvent/orgs","repos_url":"https://api.github.com/users/cominvent/repos","events_url":"https://api.github.com/users/cominvent/events{/privacy}","received_events_url":"https://api.github.com/users/cominvent/received_events","type":"Organization","site_admin":false},"repo":{"id":50277680,"name":"lucene-solr","full_name":"cominvent/lucene-solr","owner":{"login":"cominvent","id":1312200,"avatar_url":"https://avatars3.githubusercontent.com/u/1312200?v=4","gravatar_id":"","url":"https://api.github.com/users/cominvent","html_url":"https://github.com/cominvent","followers_url":"https://api.github.com/users/cominvent/followers","following_url":"https://api.github.com/users/cominvent/following{/other_user}","gists_url":"https://api.github.com/users/cominvent/gists{/gist_id}","starred_url":"https://api.github.com/users/cominvent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cominvent/subscriptions","organizations_url":"https://api.github.com/users/cominvent/orgs","repos_url":"https://api.github.com/users/cominvent/repos","events_url":"https://api.github.com/users/cominvent/events{/privacy}","received_events_url":"https://api.github.com/users/cominvent/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cominvent/lucene-solr","description":"Mirror of Apache Lucene + Solr","fork":true,"url":"https://api.github.com/repos/cominvent/lucene-solr","forks_url":"https://api.github.com/repos/cominvent/lucene-solr/forks","keys_url":"https://api.github.com/repos/cominvent/lucene-solr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cominvent/lucene-solr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cominvent/lucene-solr/teams","hooks_url":"https://api.github.com/repos/cominvent/lucene-solr/hooks","issue_events_url":"https://api.github.com/repos/cominvent/lucene-solr/issues/events{/number}","events_url":"https://api.github.com/repos/cominvent/lucene-solr/events","assignees_url":"https://api.github.com/repos/cominvent/lucene-solr/assignees{/user}","branches_url":"https://api.github.com/repos/cominvent/lucene-solr/branches{/branch}","tags_url":"https://api.github.com/repos/cominvent/lucene-solr/tags","blobs_url":"https://api.github.com/repos/cominvent/lucene-solr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cominvent/lucene-solr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cominvent/lucene-solr/git/refs{/sha}","trees_url":"https://api.github.com/repos/cominvent/lucene-solr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cominvent/lucene-solr/statuses/{sha}","languages_url":"https://api.github.com/repos/cominvent/lucene-solr/languages","stargazers_url":"https://api.github.com/repos/cominvent/lucene-solr/stargazers","contributors_url":"https://api.github.com/repos/cominvent/lucene-solr/contributors","subscribers_url":"https://api.github.com/repos/cominvent/lucene-solr/subscribers","subscription_url":"https://api.github.com/repos/cominvent/lucene-solr/subscription","commits_url":"https://api.github.com/repos/cominvent/lucene-solr/commits{/sha}","git_commits_url":"https://api.github.com/repos/cominvent/lucene-solr/git/commits{/sha}","comments_url":"https://api.github.com/repos/cominvent/lucene-solr/comments{/number}","issue_comment_url":"https://api.github.com/repos/cominvent/lucene-solr/issues/comments{/number}","contents_url":"https://api.github.com/repos/cominvent/lucene-solr/contents/{+path}","compare_url":"https://api.github.com/repos/cominvent/lucene-solr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cominvent/lucene-solr/merges","archive_url":"https://api.github.com/repos/cominvent/lucene-solr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cominvent/lucene-solr/downloads","issues_url":"https://api.github.com/repos/cominvent/lucene-solr/issues{/number}","pulls_url":"https://api.github.com/repos/cominvent/lucene-solr/pulls{/number}","milestones_url":"https://api.github.com/repos/cominvent/lucene-solr/milestones{/number}","notifications_url":"https://api.github.com/repos/cominvent/lucene-solr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cominvent/lucene-solr/labels{/name}","releases_url":"https://api.github.com/repos/cominvent/lucene-solr/releases{/id}","deployments_url":"https://api.github.com/repos/cominvent/lucene-solr/deployments","created_at":"2016-01-24T07:41:14Z","updated_at":"2016-01-24T07:41:48Z","pushed_at":"2018-03-23T16:54:40Z","git_url":"git://github.com/cominvent/lucene-solr.git","ssh_url":"git@github.com:cominvent/lucene-solr.git","clone_url":"https://github.com/cominvent/lucene-solr.git","svn_url":"https://github.com/cominvent/lucene-solr","homepage":null,"size":313775,"stargazers_count":0,"watchers_count":0,"language":"Java","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":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"e364f5be31555d3704ce4007c470feb3bd9c649b","user":{"login":"apache","id":47359,"avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":50229487,"name":"lucene-solr","full_name":"apache/lucene-solr","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/lucene-solr","description":"Mirror of Apache Lucene + Solr","fork":false,"url":"https://api.github.com/repos/apache/lucene-solr","forks_url":"https://api.github.com/repos/apache/lucene-solr/forks","keys_url":"https://api.github.com/repos/apache/lucene-solr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/lucene-solr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/lucene-solr/teams","hooks_url":"https://api.github.com/repos/apache/lucene-solr/hooks","issue_events_url":"https://api.github.com/repos/apache/lucene-solr/issues/events{/number}","events_url":"https://api.github.com/repos/apache/lucene-solr/events","assignees_url":"https://api.github.com/repos/apache/lucene-solr/assignees{/user}","branches_url":"https://api.github.com/repos/apache/lucene-solr/branches{/branch}","tags_url":"https://api.github.com/repos/apache/lucene-solr/tags","blobs_url":"https://api.github.com/repos/apache/lucene-solr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/lucene-solr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/lucene-solr/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/lucene-solr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/lucene-solr/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/lucene-solr/languages","stargazers_url":"https://api.github.com/repos/apache/lucene-solr/stargazers","contributors_url":"https://api.github.com/repos/apache/lucene-solr/contributors","subscribers_url":"https://api.github.com/repos/apache/lucene-solr/subscribers","subscription_url":"https://api.github.com/repos/apache/lucene-solr/subscription","commits_url":"https://api.github.com/repos/apache/lucene-solr/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/lucene-solr/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/lucene-solr/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/lucene-solr/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/lucene-solr/contents/{+path}","compare_url":"https://api.github.com/repos/apache/lucene-solr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/lucene-solr/merges","archive_url":"https://api.github.com/repos/apache/lucene-solr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/lucene-solr/downloads","issues_url":"https://api.github.com/repos/apache/lucene-solr/issues{/number}","pulls_url":"https://api.github.com/repos/apache/lucene-solr/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/lucene-solr/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/lucene-solr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/lucene-solr/labels{/name}","releases_url":"https://api.github.com/repos/apache/lucene-solr/releases{/id}","deployments_url":"https://api.github.com/repos/apache/lucene-solr/deployments","created_at":"2016-01-23T08:00:06Z","updated_at":"2018-03-23T15:37:26Z","pushed_at":"2018-03-23T16:54:42Z","git_url":"git://github.com/apache/lucene-solr.git","ssh_url":"git@github.com:apache/lucene-solr.git","clone_url":"https://github.com/apache/lucene-solr.git","svn_url":"https://github.com/apache/lucene-solr","homepage":null,"size":337510,"stargazers_count":1491,"watchers_count":1491,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1251,"mirror_url":null,"archived":false,"open_issues_count":176,"license":null,"forks":1251,"open_issues":176,"watchers":1491,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/lucene-solr/pulls/342"},"html":{"href":"https://github.com/apache/lucene-solr/pull/342"},"issue":{"href":"https://api.github.com/repos/apache/lucene-solr/issues/342"},"comments":{"href":"https://api.github.com/repos/apache/lucene-solr/issues/342/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/lucene-solr/pulls/342/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/lucene-solr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/lucene-solr/pulls/342/commits"},"statuses":{"href":"https://api.github.com/repos/apache/lucene-solr/statuses/07b4b3947ee67a1742686c514e0784a8ff4db51a"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"janhoy"}}