system_log table

General support regarding TimeTrex, such as
configuring policies/taxes or processing payroll.
Locked
blabj
Posts: 70
Joined: Wed Dec 26, 2007 5:09 pm

system_log table

Post by blabj »

system_log is currently the largest table in my timetrex database - now grown to over 65MB

Mostly filled with the following (or similar):

Executing Cron Job: 11 Command: "/usr/bin/php" "/var/www/localhost/htdocs/timetrex/maint/TimeClockSync.php" Return Code: 0

Is this ever purged? Or must it be manually purged?

Why store logs in the database? Can this easily be changed to log to file system instead?

-Bob
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

That is actually part of TimeTrex's Audit Trail logging. The reason it isn't stored in log files is because you can't query log files efficiently when you want to see what actions that have occurred in the last X days.

This table never gets purged automatically, but you are free to do it manually if you want. Keep in mind by doing so you will no longer have any audit trail logs for the time period that you purge.

Really 65mb is not large at all and it shouldn't affect the performance of TimeTrex much at all as data is mostly inserted into this table and rarely read from it.
blabj
Posts: 70
Joined: Wed Dec 26, 2007 5:09 pm

Post by blabj »

Thanks for the explanation Shaun. I understand the intent.

I think I will opt to do an table unload to file, followed by a table purge on a yearly basis.
Locked