Hello ANZ Team,
I would like to understand how to enable this new feature in 8,2?
Please advise. Thank you.
7 Answer(s)
-
0
Set
Configuration.Auditing.IsEnabled
andExpiredAuditLogDeleterWorker.IsEnabled
to true.if (Configuration.Auditing.IsEnabled && ExpiredAuditLogDeleterWorker.IsEnabled) { workManager.Add(IocManager.Resolve<ExpiredAuditLogDeleterWorker>()); }
-
0
Thank you @maliming. Is this something that automatically sets the expiration of the audit logs or is there a configuration that we need to set to tell the system when the logs get expired? How long is the default age when the logs get deleted?
-
0
hi @ramilcatalandomingo
You can see the source code of
ExpiredAuditLogDeleterWorker
.https://github.com/aspnetzero/aspnet-zero-core/blob/d2abf335efab309cc8f4717e2c27372831662dc5/aspnet-core/src/MyCompanyName.AbpZeroTemplate.Application/Auditing/ExpiredAuditLogDeleterWorker.cs#L18
-
0
Thank you @maliming
-
0
-
0
hi
Your code looks fine, you can debug to see if this worker is performing as expected.
-
0
Hi @ramilcatalandomingo,
Yes, that's correct :)