How to setup Database listener in outsystems?

I need to record all activity logs for my applications.

What is an activity for you? Is that an actual database transaction or the fact that a certain process has started?

If the first then I would set this up with an external tool so I'm 100% certain to log everything and not depend on a developer creating logging;

if the latter then I would create methods to write something in a some sort of log and add this action into all needed processes.

Database transaction.

External tool?

So nothing has to be done through outsystems?

For me the problem would be that you can't prevent developer errors but if you wanted to implement this I would place all entities in a separate solution and publish them read-only. Then I would create public CRUD wrappers and in these wrappers define the logging logic.

But now you put your trust into the hands of the developer. If they create for what ever reason a method to alter the database in a new action or something and don't add the logging handling into that action you are already missing a step. 

So for that use-case I would separate the application and the transaction logging of the SQL database.

This is for as far as I know the only way to creating logging for you sql transactions. There are no other logging methods that I know of but I love to be surprised and learn a new method :)