gus-asf commented on code in PR #4120:
URL: https://github.com/apache/solr/pull/4120#discussion_r2901490720


##########
solr/core/src/java/org/apache/solr/core/CoreContainer.java:
##########
@@ -2510,4 +2512,29 @@ public void addKeyVal(Object map, Object key, Object 
val) throws IOException {
           }
         });
   }
+
+  /**
+   * Check if audit logging is enabled and should happen for given event type
+   *
+   * @param eventType the audit event
+   */
+  public boolean shouldAudit(AuditEvent.EventType eventType) {

Review Comment:
   Yeah I generally agree. There are more places it can be used, but I shied 
away from fully applying these methods since it seemed like scope creep. I 
wound up adding them because , but there was just a ton of duplicated logic 
always checking null and then checking the type and it all seems a bit like a 
Law of Demeter code smell with core container handing out it's object rather 
than just answering the question too, so I added these. However you are 
probably right that I need to finish the intention here or punt it. Otherwise 
it just becomes another half done thing hanging out in the code base, so next 
update will put this stuff to full use.... actually, broader use seems to lead 
to fewer methods anyway...



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to