Hi all,
I am tasked to create the application logging logic for our CRUD operations core service modules in order to track what user creates, updates or remove from the application.
So if I understand it correctly I will need to create a new core service module (Logging_CS) which will keep the logging entity.
As for capturing the logging message itself, I should probably create it in each core service module where CRUD operations take place? How would one save that information to the logging entity as well as not saving the reference IDs but the actual value if that makes sense?
I made a pretty basic application (without a logging module) just to test out my logic but could not get it working...
The application consists of:CRUD (reactive app)CRUD_CSLookUp_CS (static lookup data including the bike brands, capacity and types)
Log output is as follows:
So that should have been: The bike brand created was <bike_brand>.
Any help would be much appreciated.
Some components to look at:
I personally liked the last one a lot and have used it several times.
Regards,
Daniel
Hi in your expression in the message field. try to pass the Bike brand instead of the bike ID. if you can attach the oml or oap file as well so i can see what is the issue.
Thanks for your reply @BabyBear, please find attached OAP:
Hi!
Starting by "where" :
The where mainly depends on the way you decide to do the log , one for all the entities or one for each entity or group of entities defined in the same eSpace.
If you choose the option "one for all the entities" , my option would be to define the "LOG entity" in a separate eSpace and try to create some actions that would be call from each CRUD action in the application to build and save the change. This option has the advantage of keeping all the info in the same place and the web blocks used to retrieve it can be the same through all the application. The big disadvantage is the fact that using in it any entity from the application will end up in a circular reference and to avoid that the id´s from the records changed kept in the LOG entity have to be integers and no relationship can be establish between the LOG entity and the other entities in the application.
If you choose one LOG entity per entity or eSpace, the screens and Web blocks, actions to load the information or to retrieve it have to be adapted to each LOG entity and cross information between LOG entities has to be considered carefully.
Best regards
Graça
Thanks for your detailed reply @Maria da Graça Peixoto.
Interesting points and that is something I will need to discuss with my team.
Also BabyBear is right , in the message text you should not use the id , or at least not only the Id. Notice that information will need to be translated every time you want to present it - normally the user don't know the records Ids - , but also to log a delete with the id from the deleted record is not very helpful in terms of knowing the content that has been deleted.
Hi,
There are good forge components that implement already what you need. Make sure not to re invent what is already available for reuse.
Search on audit, in the Forge.
Thanks Daniel, had a look at Forge, except if I am not searching by the correct term I don't see any auditing in terms of application logs.
Do you perhaps have a recommendation that can be used in production?
And I totally agree that you should not reinvent the wheel if there is already a solution to be used.
Please excuse my ignorance but does Human Readable Change History only accommodate when records are changed or also when they are added/removed from the database?
You can use it also to audit creation and deletion if my memory is not failing me.
is Audit trial available for reactive app?