public final class AuditLogger extends Object
This class handles all logging request by delegating the calls to the AuditLog
implementation given by the
AuditLogFacade
.
Constructor and Description |
---|
AuditLogger() |
Modifier and Type | Method and Description |
---|---|
static AuditLog |
getAuditLog()
Getter for the current
AuditLog implementation. |
static AuditLogFacade |
getAuditLogFacade()
Returns the
AuditLogFacade instance. |
static void |
logConfigChange(AccessRequester initiator,
String objectId,
String objectName,
Iterable<AccessedAttribute> attributesAffected,
String message,
Throwable error)
Logs the change of some attributes of configuration data.
|
static void |
logConfigChange(String objectId,
String objectName,
Iterable<AccessedAttribute> attributesAffected,
String message,
Throwable error)
Logs the change of some attributes of configuration data by the current request.
|
static void |
logConfigChangeBeginning(AccessRequester initiator,
String objectId,
String objectName,
Iterable<AccessedAttribute> attributesAffected,
String message)
Logs the start of a change of some attributes of configuration data.
|
static void |
logConfigChangeBeginning(String objectId,
String objectName,
Iterable<AccessedAttribute> attributesAffected,
String message)
Logs the start of a change of some attributes of configuration data by the current request.
|
static void |
logDataRead(AccessRequester initiator,
String objectId,
String objectName,
Iterable<AccessedAttribute> attributesAffected,
String message,
Throwable error)
Logs the read access to some attributes of an object.
|
static void |
logDataRead(String objectId,
String objectName,
Iterable<AccessedAttribute> attributesAffected,
String message,
Throwable error)
Logs the read access to some attributes of an object by the current request.
|
static void |
logDataReadAttempt(AccessRequester initiator,
String objectId,
String objectName,
Iterable<AccessedAttribute> attributesAffected,
String message)
Logs the attempt to read some attributes from an object.
|
static void |
logDataReadAttempt(String objectId,
String objectName,
Iterable<AccessedAttribute> attributesAffected,
String message)
Logs the attempt to read some attributes from an object by the current request.
|
static void |
logDataWrite(AccessRequester initiator,
String objectId,
String objectName,
Iterable<AccessedAttribute> attributesAffected,
String message,
Throwable error)
Logs the modification of some attributes of an object.
|
static void |
logDataWrite(String objectId,
String objectName,
Iterable<AccessedAttribute> attributesAffected,
String message,
Throwable error)
Logs the modification of some attributes of an object by the current request.
|
static void |
logDataWriteAttempt(AccessRequester initiator,
String objectId,
String objectName,
Iterable<AccessedAttribute> attributesAffected,
String message)
Logs the attempt to write to some attributes of an object.
|
static void |
logDataWriteAttempt(String objectId,
String objectName,
Iterable<AccessedAttribute> attributesAffected,
String message)
Logs the attempt to write to some attributes of an object by the current request.
|
static void |
logSecurityEvent(AccessRequester initiator,
String message,
Throwable throwable)
Logs a generic security event.
|
static void |
logSecurityEvent(String message,
Throwable throwable)
Logs a generic security event by the current request.
|
static void |
logSecurityEventBeginning(AccessRequester initiator,
String message)
Logs the start of a generic security event.
|
static void |
logSecurityEventBeginning(String message)
Logs the start of a generic security event by the current request.
|
static void |
setAuditLogFacade(AuditLogFacade auditLogFacade)
Replaces the default
AuditLogFacade instance. |
public static void setAuditLogFacade(AuditLogFacade auditLogFacade)
AuditLogFacade
instance. This method is for internal use only.auditLogFacade
- The facade to replace the current/default one with.public static AuditLog getAuditLog()
AuditLog
implementation.public static void logSecurityEventBeginning(AccessRequester initiator, String message)
initiator
- Information about the user that starts performing the security event.message
- Descriptive log message.public static void logSecurityEventBeginning(String message)
message
- Descriptive log message.public static void logSecurityEvent(AccessRequester initiator, String message, @Nullable Throwable throwable)
initiator
- Information about the user that performed the security event.message
- Descriptive log message.throwable
- The exception in case of an error.public static void logSecurityEvent(String message, @Nullable Throwable throwable)
message
- Descriptive log message.throwable
- The exception in case of an error.public static void logConfigChangeBeginning(AccessRequester initiator, String objectId, @Nullable String objectName, @Nullable Iterable<AccessedAttribute> attributesAffected, @Nullable String message)
initiator
- Information about the user starting to modify the configuration.objectId
- A unique identifier of the configuration from which some attributes will be changed, for example a
UUID or a primary key of a database entry.objectName
- Human readable identifier of the configuration from which some attributes will be changed.attributesAffected
- A list containing the attributes that will be changed.message
- Descriptive log message.public static void logConfigChangeBeginning(String objectId, @Nullable String objectName, @Nullable Iterable<AccessedAttribute> attributesAffected, @Nullable String message)
objectId
- A unique identifier of the configuration from which some attributes will be changed, for example a
UUID or a primary key of a database entry.objectName
- Human readable identifier of the configuration from which some attributes will be changed.attributesAffected
- A list containing the attributes that will be changed.message
- Descriptive log message.public static void logConfigChange(AccessRequester initiator, String objectId, @Nullable String objectName, @Nullable Iterable<AccessedAttribute> attributesAffected, @Nullable String message, @Nullable Throwable error)
initiator
- Information about the user modifying the configuration.objectId
- A unique identifier of the configuration from which some attributes were changed, for example a UUID
or a primary key of a database entry.objectName
- Human readable identifier of the configuration from which some attributes were changed.attributesAffected
- A list containing the attributes that were changed.message
- Descriptive log message.error
- The exception in case of an error.public static void logConfigChange(String objectId, @Nullable String objectName, @Nullable Iterable<AccessedAttribute> attributesAffected, @Nullable String message, @Nullable Throwable error)
objectId
- A unique identifier of the configuration from which some attributes were changed, for example a UUID
or a primary key of a database entry.objectName
- Human readable identifier of the configuration from which some attributes were changed.attributesAffected
- A list containing the attributes that were changed.message
- Descriptive log message.error
- The exception in case of an error.public static void logDataReadAttempt(AccessRequester initiator, String objectId, @Nullable String objectName, @Nullable Iterable<AccessedAttribute> attributesAffected, @Nullable String message)
initiator
- Information about the user trying to the read the attributes.objectId
- A unique identifier of the object from which some attributes are attempted to be read, for example a
UUID or a primary key of a database entry.objectName
- Human readable identifier of the object from which some attributes are attempted to be read.attributesAffected
- A list containing the attributes that were read.message
- Descriptive log message.public static void logDataReadAttempt(String objectId, @Nullable String objectName, @Nullable Iterable<AccessedAttribute> attributesAffected, @Nullable String message)
objectId
- A unique identifier of the object from which some attributes are attempted to be read, for example a
UUID or a primary key of a database entry.objectName
- Human readable identifier of the object from which some attributes are attempted to be read.attributesAffected
- A list containing the attributes that were read.message
- Descriptive log message.public static void logDataRead(AccessRequester initiator, String objectId, @Nullable String objectName, @Nullable Iterable<AccessedAttribute> attributesAffected, @Nullable String message, @Nullable Throwable error)
initiator
- Information about the user reading the attributes.objectId
- A unique identifier of the object from which some attributes are read, for example a UUID or a primary
key of a database entry.objectName
- Human readable identifier of the object from which some attributes are read.attributesAffected
- A list containing the attributes that were read.message
- Descriptive log message.error
- The exception in case of an error.public static void logDataRead(String objectId, @Nullable String objectName, @Nullable Iterable<AccessedAttribute> attributesAffected, @Nullable String message, @Nullable Throwable error)
objectId
- A unique identifier of the object from which some attributes are read, for example a UUID or a primary
key of a database entry.objectName
- Human readable identifier of the object from which some attributes are read.attributesAffected
- A list containing the attributes that were read.message
- Descriptive log message.error
- The exception in case of an error.public static void logDataWriteAttempt(AccessRequester initiator, String objectId, @Nullable String objectName, @Nullable Iterable<AccessedAttribute> attributesAffected, @Nullable String message)
initiator
- Information about the user trying to write to some attributes.objectId
- A unique identifier of the object from which some attributes should be modified, for example a UUID or
a primary key of a database entry.objectName
- Human readable identifier of the object from which some attributes should be modified.attributesAffected
- A list containing the attributes that should be modified, containing the old and new values.message
- Descriptive log message.public static void logDataWriteAttempt(String objectId, @Nullable String objectName, @Nullable Iterable<AccessedAttribute> attributesAffected, @Nullable String message)
objectId
- A unique identifier of the object from which some attributes should be modified, for example a UUID or
a primary key of a database entry.objectName
- Human readable identifier of the object from which some attributes should be modified.attributesAffected
- A list containing the attributes that should be modified, containing the old and new values.message
- Descriptive log message.public static void logDataWrite(AccessRequester initiator, String objectId, @Nullable String objectName, @Nullable Iterable<AccessedAttribute> attributesAffected, @Nullable String message, @Nullable Throwable error)
initiator
- Information about the user changing the attributes.objectId
- A unique identifier of the object from which some attributes are modified, for example a UUID or a
primary key of a database entry.objectName
- Human readable identifier of the object from which some attributes are modified.attributesAffected
- A list containing the attributes that should were modified, containing the old and new values.message
- Descriptive log message.error
- The exception in case of an error.public static void logDataWrite(String objectId, @Nullable String objectName, @Nullable Iterable<AccessedAttribute> attributesAffected, @Nullable String message, @Nullable Throwable error)
objectId
- A unique identifier of the object from which some attributes are modified, for example a UUID or a
primary key of a database entry.objectName
- Human readable identifier of the object from which some attributes are modified.attributesAffected
- A list containing the attributes that should were modified, containing the old and new values.message
- Descriptive log message.error
- The exception in case of an error.@Nullable public static AuditLogFacade getAuditLogFacade()
AuditLogFacade
instance. For internal use only.Copyright © 2018 SAP SE. All rights reserved.