ekaterinadimitrova2 commented on a change in pull request #1051:
URL: https://github.com/apache/cassandra/pull/1051#discussion_r686876151



##########
File path: src/java/org/apache/cassandra/audit/AuditLogManager.java
##########
@@ -148,6 +167,8 @@ public synchronized void disableAuditLog()
         unregisterAsListener();
         IAuditLogger oldLogger = auditLogger;
         auditLogger = new NoOpAuditLogger(Collections.emptyMap());
+        // when we disable audit logging, we should also reset options so we 
return default ones (from cassandra.yml)
+        auditLogOptions = DatabaseDescriptor.getAuditLoggingOptions();

Review comment:
       I think I confused you. I understand both FQL tool and AuditLog take on 
enable the default cassandra.yaml parameters and whatever is provided command 
line arguments from NodeTool. I don't want to complicate it and change that.
   My question was why we don't do:
   ```
   public AuditLogOptions getAuditLogOptions()
       {
           if(isEnabled())
               return auditLogOptions;
           else
               // otherwise get what database is configured with from 
cassandra.yaml
               return  DatabaseDescriptor.getAuditLoggingOptions();
       }
   ```
   This is how we do it for FQL log. This will make the code consistent and we 
don't need to do a reset in disable.
   




-- 
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