Open Closed

Audit Log Null Data Issue in ABP Framework #9397


User avatar
0
ElifKaya created

Audit log data is being recorded as null in the database. Shouldn't this be prevented at the domain level by ABP? It seems that data is being stored this way through events. Can you fix this issue?

Check the docs before asking a question: https://abp.io/docs/latest Check the samples to see the basic tasks: https://abp.io/docs/latest/samples The exact solution to your question may have been answered before, and please first use the search on the homepage.

Provide us with the following info: 🧐 Hint: If you are using the ABP Studio, you can see all the information about your solution from the configuration window, which opens when you right-click on the solution and click on the Solution Configuration button.

  • Exception message and full stack trace:
  • Steps to reproduce the issue:

2 Answer(s)
  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Hi, ABP does not check if the URL is empty or not, it's a nullable field, because in your code you may want to write audit logs for any internal process call. For example, you may want to audit log your event handlers and for these cases, the URL should be emptyl and you can also think similar scenerios where HttpContext is not in the place.

    If you don't want to log if the URL is empty, then you can create audit log contributor or configure AbpAuditingOptions and add a selector to its AlwaysLogSelectors property. (See https://abp.io/docs/latest/framework/infrastructure/audit-logging#abpauditingoptions)

  • User Avatar
    0
    ElifKaya created

    [EngincanV] said: Hi, ABP does not check if the URL is empty or not, it's a nullable field, because in your code you may want to write audit logs for any internal process call. For example, you may want to audit log your event handlers and for these cases, the URL should be emptyl and you can also think similar scenerios where HttpContext is not in the place.

    If you don't want to log if the URL is empty, then you can create audit log contributor or configure AbpAuditingOptions and add a selector to its AlwaysLogSelectors property. (See https://abp.io/docs/latest/framework/infrastructure/audit-logging#abpauditingoptions)

    Thanks

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.3.0-preview. Updated on June 13, 2025, 11:37