Skip to content
Skills Library
Programming · Building & coding

abp-audit-logging

/abp-audit-logging

ABP Framework v10.x (10.4–10.6) audit logging: AbpAuditingOptions, entity history, IAuditingStore, audit log storage and filtering. Use when configuring audit trails, audit logs, or entity history in ABP.

Repository
abp-skills ↗
Licence
MIT
Last repository change
14.08.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
1
Deprecation

No signals detected. Repository changed on 14.08.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

ABP Framework v10.x (10.4–10.6) audit logging: AbpAuditingOptions, entity history, IAuditingStore, audit log storage and filtering. Use when configuring audit trails, audit logs, or entity history in ABP.

Original author description

ABP Framework v10.x (10.4–10.6) audit logging: AbpAuditingOptions, entity history, IAuditingStore, audit log storage and filtering. Use when configuring audit trails, audit logs, or entity history in ABP.

How it works

  1. Trigger
  2. Quick Reference
  3. Related
Original SKILL.md headings · 98 lines, 283 words
SKILL.md preview
---
name: abp-audit-logging
description: "ABP Framework v10.x (10.4–10.6) audit logging: AbpAuditingOptions, entity history, IAuditingStore, audit log storage and filtering. Use when configuring audit trails, audit logs, or entity history in ABP."
---

# ABP Audit Logging Skill

## Trigger
Audit logging, audit trails, entity history, AbpAuditingOptions, IAuditingStore, tracking changes.

---

## Quick Reference

### Configuration
```csharp
Configure<AbpAuditingOptions>(options =>
{
    options.IsEnabled = true;
    options.IsEnabledForGetRequests = false;
    options.ApplicationName = "MyApp";
    options.EntityHistorySelectors.AddAllEntities();
});
```

### Entity History (OFF by default — must enable explicitly)
```csharp
// All entities
options.EntityHistorySelectors.AddAllEntities();

// Specific entities
options.EntityHistorySelectors.Add(new NamedTypeSelector("MySelector",
    type => typeof(IEntity).IsAssignableFrom(type)));

// Per entity
[Audited] public class MyEntity : Entity<Guid> { }
[DisableAuditing] public class SecretEntity : Entity<Guid> { }

// Specific properties
[DisableAuditing] public string Password { get; set; }
[Audited] public string Name { get; set; }  // Only log this
```

### Disable Auditing
```csharp
[DisableAuditing] public class MyController : AbpController { }
[DisableAuditing] public async Task DoWorkAsync() { }
```

### IAuditingStore (custom implementation)
```csharp
public class MyStore : IAuditingStore, ITransientDependency
{
    public async Task SaveAsync(AuditLogInfo auditInfo) { /* custom storage */ }
}
```

### Contributors
```csharp
public class MyContributor : AuditLogContributor
{
    public override Task PreContributeAsync(AuditLogContributionContext ctx)
    {
        ctx.AuditLog.ExtraProperties["CorrelationId"] = CorrelationId;
        return Task.CompletedTask;
    }
}
Configure<AbpAuditingOptions>(o => o.Contributors.Add<MyContributor>());
```

### AlwaysLog Selectors
```csharp
options.AlwaysLogSelectors.Add(new NamedTypeSelector("Critical",
    type => typeof(ICriticalService).IsAssignableFrom(type)));
```

### ASP.NET Core Options
```csharp
Configure<AbpAspNetCoreAuditingUrlOptions>(o =>
{
    o.IgnoredUrls.Add("/health");
});
```

### AuditLogInfo Key Fields
- UserId, TenantId, ExecutionTime, ExecutionDuration
- ClientIpAddress, BrowserInfo, HttpMethod, Url
- ExceptionMessage, EntityChanges, EntityPropertyChanges

### Best Practices
- Entity history OFF by default — enable explicitly
- Use AddAllEntities() only if needed (storage intensive)
- Disable auditing on sensitive properties (passwords, tokens)
- Set ApplicationName for multi-app audit databases
- Don't log GET requests unless debugging
- Monitor storage growth with entity history
- Blazor Server entity history has known limitations (#11682)

## Related

[Infrastructure](../abp-infrastructure/SKILL.md) · [DDD](../abp-ddd/SKILL.md) · [Multi-Tenancy](../abp-multitenancy/SKILL.md) · Docs: https://abp.io/docs/latest/framework/infrastructure/audit-logging

Versions

RepositoryScoreLicence
This page · burakdmir/abp-skills100MIT
burakdmir/abp-skills100MIT

Database snapshot: 13.11.2026 · package version d7338da9f41e (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100configure-audit-logging
    ABP audit logging: per-request log of requests, actions, entity change history, exceptions. USE FOR: enabling/disabling auditing, GET request logging, entity change history, AuditLogContributors, ignoring types, [Audited]/[DisableAuditing], manual scopes with IAuditingManager.…
  • 100configure-logging
    ABP startup, runtime, exception logging, and the startup-template Serilog bridge. USE FOR: typed ILogger in ABP services; IInitLoggerFactory/GetInitLogger startup buffering; ABP exceptions via LogException; Serilog via UseSerilog. DO NOT USE FOR: audit-log persistence and entity…
  • 98abp-cli
    ABP Framework v10.x (10.4–10.6) CLI and tooling: abp new, add-package, generate-proxy, ABP Studio, ABP Suite, --modern flag. Use when working with ABP CLI commands, creating projects, adding packages, or generating proxies.
  • 98abp-cli
    ABP Framework v10.x (10.4–10.6) CLI and tooling: abp new, add-package, generate-proxy, ABP Studio, ABP Suite, --modern flag. Use when working with ABP CLI commands, creating projects, adding packages, or generating proxies.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.