maoling commented on a change in pull request #1536:
URL: https://github.com/apache/zookeeper/pull/1536#discussion_r523391828
##########
File path:
zookeeper-server/src/main/java/org/apache/zookeeper/audit/ZKAuditProvider.java
##########
@@ -68,7 +68,9 @@ public static boolean isAuditEnabled() {
public static void log(String user, String operation, String znode, String
acl,
String createMode, String session, String ip,
Result result) {
- auditLogger.logAuditEvent(createLogEvent(user, operation, znode, acl,
createMode, session, ip, result));
+ if (isAuditEnabled()) {
+ auditLogger.logAuditEvent(createLogEvent(user, operation, znode,
acl, createMode, session, ip, result));
+ }
Review comment:
For this method, all the callers have a pre-check for the
`isAuditEnabled`
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]