public class OMRSAuditLog extends AuditLog
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.
  • 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 records
      componentId - numerical identifier for the component
      componentDevelopmentStatus - status of the component's implementation
      componentName - display name for the component
      componentDescription - description of the component
      componentWikiURL - 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 destination
      omrsReportingComponent - 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 class AuditLog
      Parameters:
      componentId - numerical identifier for the component
      componentDevelopmentStatus - status of the component's implementation
      componentName - display name for the component
      componentDescription - description of the component
      componentWikiURL - link to more information
      Returns:
      new logging destination
    • createNewAuditLog

      public OMRSAuditLog createNewAuditLog(OMRSAuditingComponent reportingComponent)
      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 record
      logMessageId - id for the audit log record
      severity - is this an event, decision, error or exception?
      logMessage - description of the audit log record including specific resources involved
      additionalInformation - additional data to help resolve issues of verify behavior
      systemAction - 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 occurred
      logMessageId - id for the type of exception caught
      severity - severity of the error
      logMessage - description of the exception including specific resources involved
      additionalInformation - additional data to help resolve issues of verify behavior
      systemAction - 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

      public OMRSAuditLogReport getFullReport()
      Return a full report for the OMRS Audit log.
      Returns:
      details of the originator, children and destinations