User Login and Action Logs & Database

Byhturka year ago

Hello friends,
Due to some legal laws in my country, I am required to keep user login logs (user-Action-IP-Date-Time) for 2 years,
Is there a way to store only user login log records in a separate table in MySQL?
Or what approach should we seek for a solution? I am waiting for your valuable suggestions.

Anton Tananaeva year ago

Currently we log user actions in the regular log file. If that doesn't work for you, it should be pretty easy to add an option to save it somewhere else as well.

Byhturka year ago

Hello Anton, what approach can we take to save only user login logs to a table in MySQL? Because by law I have to keep these records for 2 years. Can you give brief information about the method, which you say can be quite easy?

Anton Tananaeva year ago

Find where we log it into the log file and add the code to save it in the database there.

Byhturka year ago

As far as I understand, data is logged with the logaction.java file. I created the tc_userlogs table by editing the schema file. What should I add here to print the resulting logs to the database?