Base solution for your next web application
Open Closed

Audit Logs - Custom Data #8305


User avatar
0
inforica created

hi- Is there a way where we can populate "Custom Data" column in Audit Logs ?


5 Answer(s)
  • User Avatar
    0
    aaron created
    Support Team
  • User Avatar
    0
    inforica created

    Thanks. But How do I pass data for the column "Custom Data".

    I believe the method "CreateAuditInfo(Type type,MethodInfo method, iDictionay<string,object> arguments)" is called internally by the abp Audit provider.

    If I need to pass different custom data for different methods in Application Service how do I acheive that ?

    Can I get anything else apart from type, method and parameters into the "CreateAuditInfo" method ?.

    From What I see, Custom Data can only make use of whatever data that is being passed into this method like TenantId, UserID, arguments, impersonater userid, tenantid and nothing else..is it so ?

  • User Avatar
    0
    inforica created

    Thanks. But How do I pass data for the column "Custom Data".

    I believe the method "CreateAuditInfo(Type type,MethodInfo method, iDictionay<string,object> arguments)" is called internally by the abp Audit provider.

    If I need to pass different custom data for different methods in Application Service how do I acheive that ?

    Can I get anything else apart from type, method and parameters into the "CreateAuditInfo" method ?.

    From What I see, Custom Data can only make use of whatever data that is being passed into this method like TenantId, UserID, arguments, impersonater userid, tenantid and nothing else..is it so ?

  • User Avatar
    0
    aaron created
    Support Team

    You can use an IAmbientScopeProvider<YourCustomData>.

    AbpSessionBase and ClaimsAbpSession use such a provider to set and get ambient data respectively.

  • User Avatar
    0
    ismcagdas created
    Support Team

    This issue is closed because of no recent activity. Please open a new issue if you are still having this problem.