Base solution for your next web application
Open Closed

Audit Log custom message #8596


User avatar
0
ashvinu created

Hi, is there a way that we save a custom message per action for auditing purposes.


3 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    hi

    see ~~https<span></span>://forum.aspnetboilerplate.com/viewtopic.php?p=25857~~ #4552

  • User Avatar
    0
    ashvinu created

    Hi maliming,

    Sorry the link you gave me, was not really helpful. Is it possible to have a sample code of how to implement custom message(Meaningful name) instead of the method Name in the column action in the picture above.

  • User Avatar
    0
    maliming created
    Support Team

    What do you mean? Do you want to change the action column to other meaningful information?

    If so, you can replace the built-in IAuditingHelper component.

    You can create an Attribute. Use it on the method and get it according to MethodInfo.

    https://docs.microsoft.com/en-us/dotnet/api/system.componentmodel.displaynameattribute