Package com.tnsai.annotations
Annotation Interface AuditLog
Records method invocations to an audit trail.
Usage
@AuditLog(action = "user.approve")
public void approveUser(String userId) { }
@AuditLog(action = "config.change", includeArgs = true)
public void updateConfig(String key, String value) { }
- Since:
- 0.3.0
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanWhether to include method arguments in the audit record.booleanWhether to include the return value in the audit record.
-
Element Details
-
action
String actionAction name for the audit entry (e.g., "user.approve", "config.change").- Returns:
- action name
-
includeArgs
boolean includeArgsWhether to include method arguments in the audit record.- Returns:
- true to log args (default: false)
- Default:
false
-
includeResult
boolean includeResultWhether to include the return value in the audit record.- Returns:
- true to log result (default: false)
- Default:
false
-