Package org.gridgain.internal.mcp.audit
Interface AuditLogger
- All Known Implementing Classes:
Log4j2AuditLogger,NoOpAuditLogger
public interface AuditLogger
Interface for audit logging implementations.
Provides a pluggable architecture for different audit strategies:
- File-based logging (default)
- External system forwarding
- No-op for disabled mode
Implementations must be thread-safe as they may be called concurrently from multiple tool executions.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the audit logger and release resources.voidflush()Flush any buffered audit events to persistent storage.voidlog(AuditEvent event) Log an audit event asynchronously.
-
Method Details
-
log
Log an audit event asynchronously.Implementations should not block the caller. Events are typically queued and written in background threads.
- Parameters:
event- the audit event to log
-
flush
void flush()Flush any buffered audit events to persistent storage.Called during graceful shutdown to ensure no events are lost. Implementations should block until all pending events are written.
-
close
void close()Close the audit logger and release resources.Called during application shutdown. Should flush pending events and clean up any background threads or file handles.
-