In mendix there's a free, built-in module Audit Trail that does exactly what you're asking for. I'd recommend starting there unless you have a specific compliance requirement that needs something heavier.
The Audti trail also have the IncludeOnlyChangedAttributes constant set this to true so it logs only changed members instead of every attribute on every save.
and It also have a pre build snippet LogOverviewSnippet you can use this to show logs.
for more use this docs : https://docs.mendix.com/appstore/modules/audit-trail/
The AuditTrail.LogLine entity mainly stores information about which member was changed (for example, System.UserRoles), but the old and new values are typically stored in the Audit Trail detail records.
If you're using the Marketplace Audit Trail module, you don't need to implement this yourself. The module already provides the required functionality.
A few things to check:
LogLineDetailsSnippet, which displays the Old Value and New Value for each audited change.The following entities are used by the module for storing and displaying the audit details:
BCo_AudittrailSuperClassBDe_AudittrailSuperClassIf you're only displaying AuditTrail.LogLine in a Data Grid, you'll see information such as the changed member and timestamp, but not the detailed before/after values. Those come from the associated detail records displayed by LogLineDetailsSnippet.
Kindly mark this as the accepted answer if it helps.