How to capture the new account user creation details? e.g., created by who, updated by who

Hi everyone,

We got the scenario where whenever the new user created in ForgeRock Identity platform, we need to capture automated details like “created on”, “updated on”, “created by”, “updated by”.
I can be able to capture creation and updating time through “event hooks”. But when it comes to created and updated on, I am struggling to capture that data and put it in attribute.
1.Scenario would be we have created the admin role who have privilege to manage users and organization.
2.User with admin role login into ForgeRock and end up in “End user page” where they can see option to manage users and organization.
3.User goes into manage users and click “+New user”, add user details and click “Save”.
4.After successful save we need to see user details that user admin put along with the name of the admin who created it in the attribute “Created by”.
5.If update has been done by user admin, then we need to capture the name of the admin who updated it in the attribute “Updated by”.

Since I got some suggestion to hand on over logs and pull that information, but I couldn’t find any sample script to handle this.

It would be appreciated if anyone provide example script and the different ways it can be achieved.

Thank you in advance!