CRZbulabula commented on code in PR #16428:
URL: https://github.com/apache/iotdb/pull/16428#discussion_r2361558846
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/DataNode.java:
##########
@@ -261,6 +266,26 @@ protected void start() {
logger.info("IoTDB configuration: {}", config.getConfigMessage());
logger.info("Congratulations, IoTDB DataNode is set up successfully.
Now, enjoy yourself!");
+ // Start the Audit Service
+ if (CommonDescriptor.getInstance().getConfig().isEnableAuditLog()) {
+ AuditLogFields fields =
+ new AuditLogFields(
+ "root",
+ -1,
Review Comment:
A user seems odd here.
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/DataNode.java:
##########
@@ -261,6 +266,26 @@ protected void start() {
logger.info("IoTDB configuration: {}", config.getConfigMessage());
logger.info("Congratulations, IoTDB DataNode is set up successfully.
Now, enjoy yourself!");
+ // Start the Audit Service
+ if (CommonDescriptor.getInstance().getConfig().isEnableAuditLog()) {
+ AuditLogFields fields =
+ new AuditLogFields(
+ "root",
+ -1,
+ null,
+ AuditEventType.CHANGE_AUDIT_OPTION,
+ AuditLogOperation.CONTROL,
+ PrivilegeType.AUDIT,
+ true,
+ null,
+ null);
+ String logMessage =
+ String.format(
+ "Successfully replace enableAuditLog's default value with true
in DataNode %s",
Review Comment:
I suggest better log all configuration of audit log here.
--
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]