AuditLogService
Describes the AuditLogService
The AuditLogService is intended to be used to log Merchello related informational records that would not otherwise be normally recorded in an application's generic logging system.
Examples are
Payment authorized, Shipment Shipped and Order created records.
var auditLogService = MerchelloContext.Current.Services.AuditLogService;
The AuditLogService is exposed through the MerchelloContext
Class
public class AuditLogService : PageCachedServiceBase<IAuditLog>,
IAuditLogService, IPageCachedService<IAuditLog>, IService
Constructors
Name | Description |
---|---|
AuditLogService() | Initializes a new instance of the AuditLogService class. |
AuditLogService(ILogger) | Initializes a new instance of the AuditLogService class. |
AuditLogService(IDatabaseUnitOfWorkProvider, RepositoryFactory, ILogger) | Initializes a new instance of the AuditLogService class. |
Public Methods
Name | Description |
---|---|
CreateAuditLogWithKey(String, ExtendedDataCollection, Boolean, Boolean) | Creates an audit record and saves it to the database |
CreateAuditLogWithKey(Nullable(Guid), EntityType, String, Boolean, Boolean) | Creates an audit record and saves it to the database |
CreateAuditLogWithKey(Nullable(Guid), Nullable(Guid), String, Boolean, Boolean) | Creates an audit record and saves it to the database |
CreateAuditLogWithKey(Nullable(Guid), EntityType, String, ExtendedDataCollection, Boolean, Boolean) | Creates an audit record and saves it to the database |
CreateAuditLogWithKey(Nullable(Guid), Nullable(Guid), String, ExtendedDataCollection, Boolean, Boolean) | Creates an audit record and saves it to the database |
Delete(IAuditLog, Boolean) | Deletes a IAuditLog |
Delete(IEnumerable(IAuditLog), Boolean) | Deletes a collection of IAuditLog |
DeleteErrorAuditLogs | Deletes all error logs |
GetAuditLogsByEntityKey | Gets a collection of IAuditLog for a particular entity |
GetAuditLogsByEntityTfKey | Gets a collection of IAuditLog for an entity type |
GetByKey | Gets an IAuditLog by it's key |
GetErrorAuditLogs | Gets a collection of IAuditLog where IsError == true |
GetPage | Gets a Page of AuditLogs |
Events
Name | Description |
---|---|
Creating | Occurs before create |
Created | Occurs after create |
Deleting | Occurs before delete |
Deleted | Occurs after delete |
Saving | Occurs before saving |
Saved | Occurs after saved |
Interface on GitHub
Updated less than a minute ago