Open Closed

Audit log #3427


User avatar
0
drg_tverkroost created

Hi there,

I have read the documentation about audit log. Each entity is derived from the base class FullAuditedAggregateRoot. I expect each change of an entity should appear in the audit log. As you can see I have configured UseAuditing in my BlazorModule.cs to enable audit logging.

public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
var env = context.GetEnvironment();
var app = context.GetApplicationBuilder();
var configuration = context.GetConfiguration();

    if (env.IsDevelopment())
    {
        app.UseDeveloperExceptionPage();
    }

    app.UseAbpRequestLocalization();

    if (!env.IsDevelopment())
    {
        app.UseErrorPage();
        app.UseHsts();
    }

    app.UseHttpsRedirection();
    app.UseCorrelationId();
    app.UseStaticFiles();
    app.UseRouting();
    app.UseAuthentication();
    app.UseJwtTokenMiddleware();

    if (MultiTenancyConsts.IsEnabled)
    {
        app.UseMultiTenancy();
    }

    app.UseUnitOfWork();
    app.UseIdentityServer();
    app.UseAuthorization();
    app.UseSwagger();
    app.UseAbpSwaggerUI(options =>
    {
        options.SwaggerEndpoint("/swagger/v1/swagger.json", "NEXTjeugd API");
    });
    app.UseAuditing();
    app.UseAbpSerilogEnrichers();
    app.UseConfiguredEndpoints();
    app.UseWebDav(configuration);
}

I am only getting entries about Volo.Abp.Identity.IdentitySecurityLog which are created, but not changes. Why and how to accomplish that?

Kind regards, Tako Verkroost

ABP Framework version: v5.3.0 UI type: Blazor DB provider: EF Core Exception message and stack trace: Steps to reproduce the issue:"


1 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    https://docs.abp.io/en/abp/latest/Audit-Logging#entity-history-selectors

    btw, the audit may not work very well in Blazor Server https://github.com/abpframework/abp/issues/11682#issuecomment-1066064249

Made with ❤️ on ABP v9.1.0-preview. Updated on November 11, 2024, 11:11