As per my current search, Salesforce Setup Audit Logs are stored automatically & we can't add any records to it manually when any apex is run or page is viewed or any custom object is added, updated or deleted. Please inform if any workaround is possible.
So to achieve that we might need to add a new custom object which will store our audit logs. Please inform if anyone has any better approach.
If we need to use a custom object to add logs, we can setup triggers if any custom object is added or updated. But how can we log following?
- If any user login or logout
- If any community user login or logout from community
- If any user view salesforce standard object list or details page