Commit d7822f2
committed
Fix enable_audit_log configuration not taking effect
The audit log configuration (enable_audit_log) was not taking effect
because the configuration values were stored as static final fields
in AbstractAuditLogger, which were initialized at class loading time
before the configuration file was fully loaded.
This fix changes the static final fields to dynamic method calls:
- IS_AUDIT_LOG_ENABLED -> isAuditLogEnabled()
- AUDITABLE_OPERATION_TYPE -> getAuditableOperationType()
- AUDITABLE_OPERATION_LEVEL -> getAuditableOperationLevel()
- AUDITABLE_OPERATION_RESULT -> getAuditableOperationResult()
This ensures that the configuration values are read dynamically
at runtime, after the configuration file has been properly loaded.
Fixes: #167061 parent c77bb57 commit d7822f2
File tree
3 files changed
+25
-4
lines changed- iotdb-core
- confignode/src/main/java/org/apache/iotdb/confignode/audit
- datanode/src/main/java/org/apache/iotdb/db/audit
- node-commons/src/main/java/org/apache/iotdb/commons/audit
3 files changed
+25
-4
lines changedLines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
46 | 50 | | |
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
61 | 65 | | |
62 | 66 | | |
63 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
64 | 72 | | |
65 | 73 | | |
66 | 74 | | |
| |||
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
44 | 53 | | |
45 | 54 | | |
46 | 55 | | |
| |||
0 commit comments