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)
-
0
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 itsAlwaysLogSelectors
property. (See https://abp.io/docs/latest/framework/infrastructure/audit-logging#abpauditingoptions) -
0
[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 itsAlwaysLogSelectors
property. (See https://abp.io/docs/latest/framework/infrastructure/audit-logging#abpauditingoptions)Thanks