java.lang.Object
org.odpi.openmetadata.frameworks.auditlog.MessageFormatter
org.odpi.openmetadata.frameworks.auditlog.AuditLog
Direct Known Subclasses:
OMRSAuditLog

public class AuditLog extends MessageFormatter
AuditLog is the superclass of audit log implementations. It is concrete and so can be used directly as well.
  • Field Details

  • Constructor Details

    • AuditLog

      public AuditLog(AuditLogDestination destination, int componentId, ComponentDevelopmentStatus componentDevelopmentStatus, String componentName, String componentDescription, String componentWikiURL)
      Typical constructor: each component using the audit log will create their own AuditLog instance and will push log records to it.
      Parameters:
      destination - destination for the log records
      componentId - numerical identifier for the component
      componentDevelopmentStatus - development status
      componentName - display name for the component
      componentDescription - description of the component
      componentWikiURL - link to more information
    • AuditLog

      public AuditLog(AuditLogDestination destination, ComponentDescription reportingComponent)
      Constructor used to create the root audit log for a process/server
      Parameters:
      destination - new logging destination
      reportingComponent - information about the component that will use this instance of the audit log.
  • Method Details

    • createNewAuditLog

      public AuditLog createNewAuditLog(int componentId, ComponentDevelopmentStatus componentDevelopmentStatus, String componentName, String componentDescription, String componentWikiURL)
      Clone request is used to create an audit log for a component outside the OMRS.
      Parameters:
      componentId - numerical identifier for the component
      componentDevelopmentStatus - development status
      componentName - display name for the component
      componentDescription - description of the component
      componentWikiURL - link to more information
      Returns:
      new logging destination
    • createNewAuditLog

      public AuditLog createNewAuditLog(ComponentDescription childComponent)
      Constructor used to create the root audit log for OMRS
      Parameters:
      childComponent - information about the component that will use this instance of the audit log.
      Returns:
      new logging destination
    • logMessage

      public void logMessage(String actionDescription, AuditLogMessageDefinition messageDefinition)
      Log an audit log message.
      Parameters:
      actionDescription - short description of the activity
      messageDefinition - message content to log
    • logMessage

      public void logMessage(String actionDescription, AuditLogMessageDefinition messageDefinition, String additionalInformation)
      Log an audit log message.
      Parameters:
      actionDescription - short description of the activity
      messageDefinition - message content to log
      additionalInformation - supporting information
    • logMessage

      public void logMessage(String actionDescription, AuditLogMessageDefinition messageDefinition, List<String> additionalInformation)
      Log an audit log message.
      Parameters:
      actionDescription - short description of the activity
      messageDefinition - message content to log
      additionalInformation - supporting information
    • logException

      public void logException(String actionDescription, AuditLogMessageDefinition messageDefinition, Throwable caughtException)
      Log an audit log message associated with a caught exception.
      Parameters:
      actionDescription - short description of the activity
      messageDefinition - message content to log
      caughtException - the exception associated with the message
    • logException

      public void logException(String actionDescription, AuditLogMessageDefinition messageDefinition, String additionalInformation, Throwable caughtException)
      Log an audit log message associated with a caught exception.
      Parameters:
      actionDescription - short description of the activity
      messageDefinition - message content to log
      additionalInformation - supporting information
      caughtException - the exception associated with the message
    • logException

      public void logException(String actionDescription, AuditLogMessageDefinition messageDefinition, List<String> additionalInformation, Throwable caughtException)
      Log an audit log message associated with a caught exception.
      Parameters:
      actionDescription - short description of the activity
      messageDefinition - message content to log
      additionalInformation - supporting information
      caughtException - the exception associated with the message
    • getOriginatorProperties

      public Map<String,String> getOriginatorProperties()
      Return the map of properties used to describe the originator process/server.
      Returns:
      map of name-value pairs
    • getReport

      public AuditLogReport getReport()
      Return a report describing the audit log's properties and activity.
      Returns:
      audit log report structure