Browse Source

Document DisableAuditing usage on method parameters

pull/26048/head
maliming 3 days ago
parent
commit
169e3f736a
No known key found for this signature in database GPG Key ID: A646B9CB645ECEA4
  1. 16
      docs/en/framework/infrastructure/audit-logging.md

16
docs/en/framework/infrastructure/audit-logging.md

@ -165,6 +165,22 @@ public class HomeController : AbpController
}
````
### Hiding Parameter Values
An audited action writes its parameter values into the audit log. Use `[DisableAuditing]` on a parameter when its value is sensitive:
````csharp
public class HomeController : AbpController
{
public async Task<ActionResult> SetConnectionString([DisableAuditing] string connectionString)
{
//...
}
}
````
The action is still audit logged and the parameter name is still written, but its value is replaced with `null`.
### Enable/Disable for Application Services & Methods
[Application service](../architecture/domain-driven-design/application-services.md) method calls also included into the audit log by default. You can use the `[DisableAuditing]` in service or method level.

Loading…
Cancel
Save