Class AuditLog
- java.lang.Object
-
- org.odpi.openmetadata.frameworks.auditlog.MessageFormatter
-
- org.odpi.openmetadata.frameworks.auditlog.AuditLog
-
public class AuditLog extends MessageFormatter
AuditLog is the superclass of audit log implementations. It is concrete and so can be used directly as well.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAuditLog.AuditLogActivityCount up the number of records of each severity logged by a component.
-
Field Summary
Fields Modifier and Type Field Description protected AuditLog.AuditLogActivityauditLogActivityprotected List<AuditLog>childAuditLogs
-
Constructor Summary
Constructors Constructor Description AuditLog(AuditLogDestination destination, int componentId, 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AuditLogcreateNewAuditLog(int componentId, String componentName, String componentDescription, String componentWikiURL)Clone request is used to create an audit log for a component outside of OMRS.AuditLogcreateNewAuditLog(ComponentDescription childComponent)Constructor used to create the root audit log for OMRSMap<String,String>getOriginatorProperties()Return the map of properties used to describe the originator process/server.AuditLogReportgetReport()Return a report describing the audit log's properties and activity.voidlogException(String actionDescription, AuditLogMessageDefinition messageDefinition, String additionalInformation, Throwable caughtException)Log an audit log message associated with a caught exception.voidlogException(String actionDescription, AuditLogMessageDefinition messageDefinition, Throwable caughtException)Log an audit log message associated with a caught exception.voidlogException(String actionDescription, AuditLogMessageDefinition messageDefinition, List<String> additionalInformation, Throwable caughtException)Log an audit log message associated with a caught exception.voidlogMessage(String actionDescription, AuditLogMessageDefinition messageDefinition)Log an audit log message.voidlogMessage(String actionDescription, AuditLogMessageDefinition messageDefinition, String additionalInformation)Log an audit log message.voidlogMessage(String actionDescription, AuditLogMessageDefinition messageDefinition, List<String> additionalInformation)Log an audit log message.-
Methods inherited from class org.odpi.openmetadata.frameworks.auditlog.MessageFormatter
getFormattedMessage
-
-
-
-
Field Detail
-
auditLogActivity
protected AuditLog.AuditLogActivity auditLogActivity
-
-
Constructor Detail
-
AuditLog
public AuditLog(AuditLogDestination destination, int componentId, 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 component.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 destinationreportingComponent- information about the component that will use this instance of the audit log.
-
-
Method Detail
-
createNewAuditLog
public AuditLog createNewAuditLog(int componentId, String componentName, String componentDescription, String componentWikiURL)
Clone request is used to create an audit log for a component outside of OMRS.- Parameters:
componentId- numerical identifier for the component.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 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
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
-
-