Class AuditLogRecorder
java.lang.Object
org.odpi.openmetadata.frameworks.auditlog.AuditLogRecorder
AuditLogRecorder writes audit log records to an audit log that may not have been supplied. When there is no audit
log - for example, a connector that is running outside an OMAG Server, or the connector that is itself the
destination for the audit log - the record is written to standard out instead. This means callers do not need to
test for a null audit log before each message.
Classes that keep their audit log in a field use the logRecord/logExceptionRecord methods of their base class (
Classes that keep their audit log in a field use the logRecord/logExceptionRecord methods of their base class (
AuditLoggingBase, or the framework base class that they extend). These static methods are for code that
is passed the audit log as a parameter.-
Method Summary
Modifier and TypeMethodDescriptionstatic voidlogExceptionRecord(AuditLog auditLog, String actionDescription, AuditLogMessageDefinition messageDefinition, String additionalInformation, Throwable exception) Log an audit log record for an exception, with supporting information.static voidlogExceptionRecord(AuditLog auditLog, String actionDescription, AuditLogMessageDefinition messageDefinition, Throwable exception) Log an audit log record for an exception.static voidlogRecord(AuditLog auditLog, String actionDescription, AuditLogMessageDefinition messageDefinition) Log an audit log record for an event, decision, error, or exception.static voidlogRecord(AuditLog auditLog, String actionDescription, AuditLogMessageDefinition messageDefinition, String additionalInformation) Log an audit log record for an event, decision, error, or exception, with supporting information.
-
Method Details
-
logRecord
public static void logRecord(AuditLog auditLog, String actionDescription, AuditLogMessageDefinition messageDefinition) Log an audit log record for an event, decision, error, or exception.- Parameters:
auditLog- logging destination - may be nullactionDescription- calling methodmessageDefinition- description of the audit log record including specific resources involved
-
logRecord
public static void logRecord(AuditLog auditLog, String actionDescription, AuditLogMessageDefinition messageDefinition, String additionalInformation) Log an audit log record for an event, decision, error, or exception, with supporting information.- Parameters:
auditLog- logging destination - may be nullactionDescription- calling methodmessageDefinition- description of the audit log record including specific resources involvedadditionalInformation- supporting information
-
logExceptionRecord
public static void logExceptionRecord(AuditLog auditLog, String actionDescription, AuditLogMessageDefinition messageDefinition, Throwable exception) Log an audit log record for an exception.- Parameters:
auditLog- logging destination - may be nullactionDescription- calling methodmessageDefinition- description of the audit log record including specific resources involvedexception- the exception associated with the message
-
logExceptionRecord
public static void logExceptionRecord(AuditLog auditLog, String actionDescription, AuditLogMessageDefinition messageDefinition, String additionalInformation, Throwable exception) Log an audit log record for an exception, with supporting information.- Parameters:
auditLog- logging destination - may be nullactionDescription- calling methodmessageDefinition- description of the audit log record including specific resources involvedadditionalInformation- supporting informationexception- the exception associated with the message
-