Base solution for your next web application
Open Closed

How to disable audit logs for some AppService classes? #7560


User avatar
0
ajayak created

Hi,

How can I disable Audit logs for some AppServices in my code? Specifically, disable logs for all AppServices containg HookAppService in their name.


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

    You can use [DisableAuditing] in your service or you can override the ShouldSaveAudit method to implement your custom logic.

    https://aspnetboilerplate.com/Pages/Documents/Audit-Logging#enable-disable-by-attributes

    https://github.com/aspnetboilerplate/aspnetboilerplate/blob/8270b3e9197a69be71ea2b8d1de1ed7a073dc69c/src/Abp/Auditing/AuditingHelper.cs#L43