This module implements the Audit Logging system of an application;
- See all audit logs of the system and filter audit logs easily.
- View audit log details, executed actions and changed entities.
- See all changes of entities and filter entity change logs.
- View details of an entity change.
- View all changes of an entity.
- This module also defines reusable "Average Execution Duration Per Day" and "Error Rate" widgets.
See the module description page for an overview of the module features.
Identity is pre-installed in the startup templates. So, no need to manually install it.
This module follows the module development best practices guide and consists of several NuGet and NPM packages. See the guide if you want to understand the packages and relations between them.
- Volo.Abp.AuditLogging.Domain.Shared
- Volo.Abp.AuditLogging.Domain
- Volo.Abp.AuditLogging.Application.Contracts
- Volo.Abp.AuditLogging.Application
- Volo.Abp.AuditLogging.EntityFrameworkCore
- Volo.Abp.AuditLogging.MongoDB
- Volo.Abp.AuditLogging.HttpApi
- Volo.Abp.AuditLogging.HttpApi.Client
- Volo.Abp.AuditLogging.Web
- @volo/abp.ng.audit-logging
Audit logs module adds the following items to the "Main" menu, under the "Administration" menu item:
- Audit Logs: List, view and filter audit logs and entity changes.
IAbpAuditLoggingMainMenuNames
class has the constants for the menu item names.
Audit logs tab is used to list, view and filter audit logs and entity changes in the system.
Each line on the list contains basic information about an audit log like HTTP Status Code, HTTP Method, Execution Time etc...
You can view details of an audit log by clicking the magnifier icon on each audit log line:
- Overall: This tab contains detailed information about audit log.
- Actions: This tab shows list of actions (controller actions and application service method calls with their parameters) executed during a web request.
- Changes: This tab shows changed entities during the web request.
Entity changes tab is used to list, view and filter entity change logs.
Each line on the list contains basic information about an entity change log like Time (time of change), Change Type etc...
You can view details of an entity change log by clicking the "Change Details" action item in the entity change log list:
You can view details of all changes of an entity by clicking the "Full Change History" action item in the entity change log list:
This module doesn't seed any data.
AbpAuditingOptions
can be configured in the UI layer, in the ConfigureServices
method of your module. Example:
Configure<AbpAuditingOptions>(options =>
{
//Set options here...
});
To see AbpAuditingOptions
properties, please see its documentation.
This module follows the Entity Best Practices & Conventions guide.
An audit log is a security-relevant chronological record, set of records, and/or destination and source of records that provide documentary evidence of the sequence of activities that have affected at any time a specific operation, procedure, or event.
AuditLog
(aggregate root): Represents an audit log in the system.EntityChange
(collection): Changed entities of audit log.AuditLogAction
(collection): Executed actions of audit log.
This module follows the Repository Best Practices & Conventions guide.
Following custom repositories are defined for this module:
IAuditLogRepository
AuditLogsAppService
(implementsIAuditLogsAppService
): Implements the use cases of the audit logs management UI.
All tables/collections use the Abp
prefix by default. Set static properties on the AbpAuditLoggingDbProperties
class if you need to change the table prefix or set a schema name (if supported by your database provider).
This module uses AbpAuditLogging
for the connection string name. If you don't define a connection string with this name, it fallbacks to the Default
connection string.
See the connection strings documentation for details.
- AbpAuditLogs
- AbpAuditLogActions
- AbpEntityChanges
- AbpEntityPropertyChanges
- AbpAuditLogs
See the AbpAuditLoggingPermissions
class members for all permissions defined for this module.
In order to configure the application to use the AuditLoggingModule
, you first need to import AuditLoggingConfigModule
from @volo/abp.ng.audit-logging/config
to root module. AuditLoggingConfigModule
has a static forRoot
method which you should call for a proper configuration.
// app.module.ts
import { AuditLoggingConfigModule } from '@volo/abp.ng.audit-logging/config';
@NgModule({
imports: [
// other imports
AuditLoggingConfigModule.forRoot(),
// other imports
],
// ...
})
export class AppModule {}
The AuditLoggingModule
should be imported and lazy-loaded in your routing module. It has a static forLazy
method for configuration. Available options are listed below. It is available for import from @volo/abp.ng.audit-logging
.
// app-routing.module.ts
const routes: Routes = [
// other route definitions
{
path: 'audit-logs',
loadChildren: () =>
import('@volo/abp.ng.audit-logging').then(m => m.AuditLoggingModule.forLazy(/* options here */)),
},
];
@NgModule(/* AppRoutingModule metadata */)
export class AppRoutingModule {}
If you have generated your project via the startup template, you do not have to do anything, because it already has both
AuditLoggingConfigModule
andAuditLoggingModule
.
You can modify the look and behavior of the module pages by passing the following options to AuditLoggingModule.forLazy
static method:
- entityActionContributors: Changes grid actions. Please check Entity Action Extensions for Angular for details.
- toolbarActionContributors: Changes page toolbar. Please check Page Toolbar Extensions for Angular for details.
- entityPropContributors: Changes table columns. Please check Data Table Column Extensions for Angular for details.
The @volo/abp.ng.audit-logging
package exports the following services which cover HTTP requests to counterpart APIs:
- AuditLoggingService: Covers several methods that performing HTTP calls for
Audit Logs
page. - EntityChangeService: Covers several methods that performing HTTP calls for
Entity Changes
tab inAudit Logs
page.
eAuditLoggingComponents
enum provides all replaceable component keys. It is available for import from @volo/abp.ng.audit-logging
.
Please check Component Replacement document for details.
The Audit Logging module remote endpoint URL can be configured in the environment files.
export const environment = {
// other configurations
apis: {
default: {
url: 'default url here',
},
AbpAuditLogging: {
url: 'Audit Logging remote url here'
}
// other api configurations
},
};
The Audit Logging module remote URL configuration shown above is optional. If you don't set a URL, the default.url
will be used as fallback.
This module doesn't define any additional distributed event. See the standard distributed events.