I got this issue when I use SimpleLogAuditingStore, it works a few months ago. but not works for current version any more.
here is the code below:
context.Services.Replace(ServiceDescriptor.Singleton<IAuditingStore, SimpleLogAuditingStore>());
For log config in Program.cs
.Enrich.FromLogContext()
.WriteTo.Async(x => x.Console())
Add a attribute to any application service
[AllowAnonymous]
[DisableAuditing]
public async Task<LoginResult> LoginAsync(LoginInput input)
Then I got this output on the console:
[14:40:31 INF] AUDIT LOG: [200: POST ] /api/app/user/login
- UserName - UserId : -
- ClientIpAddress : ::1
- ExecutionDuration : 204
can you take a look please?
I will check this.
In fact, the AuditLogAction will not be recorded, but the audit log middleware will record an AuditLog so you will see it in the output.
I am not sure if this is by design. @maliming What do you think?
en...I see..... nice to have. cause I have a lot of recurring jobs that output massive logs.
You can customize IAuditingStore to filter some logs.
Most helpful comment
en...I see..... nice to have. cause I have a lot of recurring jobs that output massive logs.