#1 2024-03-28 00:40:30

htits2008
Member
Registered: 2015-03-25
Posts: 31

How to record user behavior logs?

In order to improve system security and project reliability, a user audit function is added to record user behavior logs. One method is to use TSynLog, another method is to intercept method events from the interface, and finally the framework's time machine.
I hope everyone can help improve the plan and provide key suggestions.

Offline

#2 2024-03-28 07:24:48

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,242
Website

Re: How to record user behavior logs?

Those 3 methods are fine.

You have also the interface-level SOA execution statistics into a TOrmServiceLog ORM table, with TServiceContainerServer.SetServiceLog.
It write one DB row per SOA call, so you can easily search using SQL within the stats DB.

Or perhaps I would add this feature outside of the mORMot logic.
I mean, if you define a SOA server, I would implement an Audit Trail not at mORMot level, but in your interfaces/classes logic.
- or was it your 2nd method?

Online

#3 2024-04-02 07:00:00

htits2008
Member
Registered: 2015-03-25
Posts: 31

Re: How to record user behavior logs?

Thank you!  Of course, if there are events, use events, if there are interfaces, use interfaces, and callback functions are also acceptable.

Offline

Board footer

Powered by FluxBB