Class AuditLog
java.lang.Object
org.odpi.openmetadata.frameworks.auditlog.MessageFormatter
org.odpi.openmetadata.frameworks.auditlog.AuditLog
- Direct Known Subclasses:
OMRSAuditLog
AuditLog is the superclass of audit log implementations. It is concrete
and so can be used directly as well.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Count up the number of records of each severity logged by a component. -
Field Summary
-
Constructor Summary
ConstructorDescriptionAuditLog
(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.AuditLog
(AuditLogDestination destination, ComponentDescription reportingComponent) Constructor used to create the root audit log for a process/server -
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 the OMRS.createNewAuditLog
(ComponentDescription childComponent) Constructor used to create the root audit log for OMRSReturn the map of properties used to describe the originator process/server.Return a report describing the audit log's properties and activity.void
logException
(String actionDescription, AuditLogMessageDefinition messageDefinition, String additionalInformation, Throwable caughtException) Log an audit log message associated with a caught exception.void
logException
(String actionDescription, AuditLogMessageDefinition messageDefinition, Throwable caughtException) Log an audit log message associated with a caught exception.void
logException
(String actionDescription, AuditLogMessageDefinition messageDefinition, List<String> additionalInformation, Throwable caughtException) Log an audit log message associated with a caught exception.void
logMessage
(String actionDescription, AuditLogMessageDefinition messageDefinition) Log an audit log message.void
logMessage
(String actionDescription, AuditLogMessageDefinition messageDefinition, String additionalInformation) Log an audit log message.void
logMessage
(String actionDescription, AuditLogMessageDefinition messageDefinition, List<String> additionalInformation) Log an audit log message.Methods inherited from class org.odpi.openmetadata.frameworks.auditlog.MessageFormatter
getFormattedMessage
-
Field Details
-
childAuditLogs
-
auditLogActivity
-
-
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 recordscomponentId
- numerical identifier for the componentcomponentDevelopmentStatus
- development statuscomponentName
- display name for the componentcomponentDescription
- description of the componentcomponentWikiURL
- link to more information
-
AuditLog
Constructor used to create the root audit log for a process/server- Parameters:
destination
- new logging destinationreportingComponent
- 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 componentcomponentDevelopmentStatus
- development statuscomponentName
- 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:
childComponent
- information about the component that will use this instance of the audit log.- Returns:
- new logging destination
-
logMessage
Log an audit log message.- Parameters:
actionDescription
- short description of the activitymessageDefinition
- 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 activitymessageDefinition
- message content to logadditionalInformation
- supporting information
-
logMessage
public void logMessage(String actionDescription, AuditLogMessageDefinition messageDefinition, List<String> additionalInformation) Log an audit log message.- Parameters:
actionDescription
- short description of the activitymessageDefinition
- message content to logadditionalInformation
- 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 activitymessageDefinition
- message content to logcaughtException
- 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 activitymessageDefinition
- message content to logadditionalInformation
- supporting informationcaughtException
- 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 activitymessageDefinition
- message content to logadditionalInformation
- supporting informationcaughtException
- the exception associated with the message
-
getOriginatorProperties
Return the map of properties used to describe the originator process/server.- Returns:
- map of name-value pairs
-
getReport
Return a report describing the audit log's properties and activity.- Returns:
- audit log report structure
-