You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by GitBox <gi...@apache.org> on 2020/11/17 06:24:48 UTC
[GitHub] [zookeeper] zengchao1212 commented on a change in pull request #1536: ZOOKEEPER-4002:ZKAuditProvider throw NullPointerException if 'AUDIT_ENABLE' is false
zengchao1212 commented on a change in pull request #1536:
URL: https://github.com/apache/zookeeper/pull/1536#discussion_r524909681
##########
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:
Right,my mistake
----------------------------------------------------------------
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:
users@infra.apache.org