Starts in:
0 DAY
0 HR
37 MIN
30 SEC
Starts in:
0 D
0 H
37 M
30 S

Activities of "p.j.keukens"

Thanks for the help, by knowing what to check I was able to find the problem. One of the submodules was missing a typeof dependency.

Ah yeah, stupid mistake by me... Thanks

@maliming just send you a freshly created project with the same problem.

I've found the problem and solved it, thanks.

Hi,

You guys said that the change underneath would be merged in abp 6.0.0 but I have upgraded my project to 6.0.0 and the property

EntityPropertyChangeInfo.MaxValueLength is still a const int instead of a static int

https://github.com/abpframework/abp/blob/745d374a5a433a12d45e2ef591e6c85265a785cb/framework/src/Volo.Abp.Auditing/Volo/Abp/Auditing/EntityPropertyChangeInfo.cs#L18

As I have my entities marked as audited the changed properties should show up but the audit log and the database only show the action not the properties. So the problem is still there, we need to be able to rely on the audit log.

You can either log them manually or add to EntityHistorySelectors in AbpAuditingOptions.

@gterdem I have decorated the classes with [Audited] which should be the same as with the entityhistoryselectors isn't it?

Okay so I created my own audited scope

    using (var informationScope = auditingManager.BeginScope())
    {
        auditingManager.Current.Log.Url = "InformationWorker";
        auditingManager.Current.Log.UserName = "Hangfire";
        auditingManager.Current.Log.HttpStatusCode = 200;

        ..... get entities .....        
        ..... update entity .....
        ..... create entity .....
        
        await informationScope.SaveAsync(); 
    }       

Now this shows one action which is fine, then it shows the entity changes but only the insert has properties. The entitities that are updated don't show the changed properties, the entitychange is empty. Do I need to log them manually?

Hi,

I have overridden the EntityHistoryHelper and that works, larger JSON is now stored in the table. There is still one weird thing and that is that the Created event on the entity is not audited.

I do see the updated event when I change it (in a webpage) but the created not so much.

Could this be because the created is in a Hangfirejob?

Job definition:

public class InformationWorker : HangfireBackgroundWorkerBase

Entity:

[Audited]
public class InformationResponse : FullAuditedEntity

Repository:

public class EfCoreInformationResponseRepository : EfCoreRepository<InformationDbContext, InformationResponse>, IInformationResponseRepository

Insert action:

await informationResponseRepository.InsertAsync(new InformationResponse(details.Id, jsonData));

Any ideas on why the created event is not in the audit log?

Hi,

Yeah I see that realLiangshiwei has changed it yesterday from const to static. In which release will these changes be available?

Thanks.

Hi,

EntityPropertyChangeInfo.MaxValueLength is not a static property so I can't change it.

any other way to solve this problem?

Showing 1 to 10 of 10 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06