Class OMRSAuditLog
java.lang.Object
org.odpi.openmetadata.frameworks.auditlog.MessageFormatter
org.odpi.openmetadata.frameworks.auditlog.AuditLog
org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLog
OMRSAuditLog is a class for managing the audit logging of activity for the OMAG components. Each auditing component
will have their own instance of an OMRSAuditLog. OMRSAuditLog will ensure audit log records are written to
disk in the common OMRSAuditLog for this local server.
There are different severities of log record to cover all the activity of the OMRS.
This audit log is critical to validate the behavior of the OMAG Service, particularly in the initial interaction of
a new member in the OMRS Cohort.
Note:
There are two implementations in play. The original version was where all the function was provided by OMRS.
When the Audit Log Framework (ALF) was added, the OMRS Audit Log was changed to inherit from it. This means that
connectors and OMAG services can use the ALF. The original OMRS versions are maintained for backward compatibility.
The interface used by the originator will have no difference to the output of the audit log connectors.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.odpi.openmetadata.frameworks.auditlog.AuditLog
AuditLog.AuditLogActivity
-
Field Summary
Fields inherited from class org.odpi.openmetadata.frameworks.auditlog.AuditLog
auditLogActivity, childAuditLogs
-
Constructor Summary
ConstructorDescriptionOMRSAuditLog
(OMRSAuditLogDestination omrsDestination, int componentId, ComponentDevelopmentStatus componentDevelopmentStatus, String componentName, String componentDescription, String componentWikiURL) Typical constructor: each component using the Audit log will create their own OMRSAuditLog instance and will push log records to it.OMRSAuditLog
(OMRSAuditLogDestination omrsDestination, OMRSAuditingComponent omrsReportingComponent) Constructor used to create the root audit log for OMRS -
Method Summary
Modifier and TypeMethodDescriptioncreateNewAuditLog
(int componentId, ComponentDevelopmentStatus componentDevelopmentStatus, String componentName, String componentDescription, String componentWikiURL) Clone request is used to create an audit log for a component outside of OMRS.createNewAuditLog
(OMRSAuditingComponent reportingComponent) Constructor used to create the root audit log for OMRSReturn a full report for the OMRS Audit log.void
logException
(String actionDescription, String logMessageId, OMRSAuditLogRecordSeverity severity, String logMessage, String additionalInformation, String systemAction, String userAction, Exception caughtException) Log details of an unexpected exception detected by the open metadata modules.void
logRecord
(String actionDescription, String logMessageId, OMRSAuditLogRecordSeverity severity, String logMessage, String additionalInformation, String systemAction, String userAction) Log an audit log record for an event, decision, error, or exception detected by the open metadata services.Methods inherited from class org.odpi.openmetadata.frameworks.auditlog.AuditLog
createNewAuditLog, getOriginatorProperties, getReport, logException, logException, logException, logMessage, logMessage, logMessage
Methods inherited from class org.odpi.openmetadata.frameworks.auditlog.MessageFormatter
getFormattedMessage
-
Constructor Details
-
OMRSAuditLog
public OMRSAuditLog(OMRSAuditLogDestination omrsDestination, int componentId, ComponentDevelopmentStatus componentDevelopmentStatus, String componentName, String componentDescription, String componentWikiURL) Typical constructor: each component using the Audit log will create their own OMRSAuditLog instance and will push log records to it.- Parameters:
omrsDestination
- destination for the log recordscomponentId
- numerical identifier for the componentcomponentDevelopmentStatus
- status of the component's implementationcomponentName
- display name for the componentcomponentDescription
- description of the componentcomponentWikiURL
- link to more information
-
OMRSAuditLog
public OMRSAuditLog(OMRSAuditLogDestination omrsDestination, OMRSAuditingComponent omrsReportingComponent) Constructor used to create the root audit log for OMRS- Parameters:
omrsDestination
- new logging destinationomrsReportingComponent
- information about the component that will use this instance of the audit log.
-
-
Method Details
-
createNewAuditLog
public OMRSAuditLog createNewAuditLog(int componentId, ComponentDevelopmentStatus componentDevelopmentStatus, String componentName, String componentDescription, String componentWikiURL) Clone request is used to create an audit log for a component outside of OMRS.- Overrides:
createNewAuditLog
in classAuditLog
- Parameters:
componentId
- numerical identifier for the componentcomponentDevelopmentStatus
- status of the component's implementationcomponentName
- display name for the componentcomponentDescription
- description of the componentcomponentWikiURL
- link to more information- Returns:
- new logging destination
-
createNewAuditLog
Constructor used to create the root audit log for OMRS- Parameters:
reportingComponent
- information about the component that will use this instance of the audit log.- Returns:
- new logging destination
-
logRecord
public void logRecord(String actionDescription, String logMessageId, OMRSAuditLogRecordSeverity severity, String logMessage, String additionalInformation, String systemAction, String userAction) Log an audit log record for an event, decision, error, or exception detected by the open metadata services.- Parameters:
actionDescription
- description of the activity creating the audit log recordlogMessageId
- id for the audit log recordseverity
- is this an event, decision, error or exception?logMessage
- description of the audit log record including specific resources involvedadditionalInformation
- additional data to help resolve issues of verify behaviorsystemAction
- the related action taken by the OMRS.userAction
- details of any action that an administrator needs to take.
-
logException
public void logException(String actionDescription, String logMessageId, OMRSAuditLogRecordSeverity severity, String logMessage, String additionalInformation, String systemAction, String userAction, Exception caughtException) Log details of an unexpected exception detected by the open metadata modules. These exceptions typically mean that the local server is not configured correctly, or there is a logic error in the code. When exceptions are logged, it is important that they are investigated and the cause corrected since the local repository is not able to operate as a proper peer in the open metadata repository cohort whilst these conditions persist.- Parameters:
actionDescription
- description of the activity in progress when the error occurredlogMessageId
- id for the type of exception caughtseverity
- severity of the errorlogMessage
- description of the exception including specific resources involvedadditionalInformation
- additional data to help resolve issues of verify behaviorsystemAction
- the action taken by the OMRS in response to the error.userAction
- details of any action that an administrator needs to take.caughtException
- the original exception.
-
getFullReport
Return a full report for the OMRS Audit log.- Returns:
- details of the originator, children and destinations
-