ABP 不调用自定义 Audit Store 实现

ABP doesn't call custom Audit Store implementation

我正在使用 ABP 版本 0.9.1.0。

我需要实施我自己的审计商店。我遵循文档中的指南;我只是创建了一个与 SimpleLogAuditingStore 相同的 class 并且我只将其名称更改为 DBAuditStore.

我也读过这个post:https://forum.aspnetboilerplate.com/viewtopic.php?f=2&t=340,但似乎不起作用。

当我在我的应用程序服务层中抛出一个 Exception 时,它不会执行我的 DBAuditStore.Save 方法。

是否有任何配置可以使我的自定义审核存储成为默认存储?

您应该替换模块中的 IAuditingStore

// using Abp.Configuration.Startup;

public override void PreInitialize()
{
    Configuration.ReplaceService<IAuditingStore, DBAuditStore>();
}