Activity log

From Group-Office Groupware and CRM Documentation
Jump to: navigation, search

You can optionally install the activity log module. This will log all delete, update and add actions. It also logs logins,logouts and outgoing e-mail. The log module may have an performance impact because it does extra database transactions. Log entries will be stored for 14 days. Then they will be dumped into a CSV file on the server.

Cron job for rotating the log

Log entries older then 14 days (Can be changed with $config['log_max_days']=<number of days>;) can be dumped to /var/log/groupoffice/*.csv with command:

./groupofficecli.php -r=log/log/rotate

An example cron entry:

0 0 * * * root /usr/bin/php /usr/share/groupoffice/groupofficecli.php -r=log/log/rotate -c=/etc/groupoffice/config.php > /dev/null

You can setup to rotate the log by creating a config file for logrotate in /etc/logrotate.d/groupoffice.

Put this in it:

/var/log/groupoffice/*.csv {
        rotate 52
        create 640 root adm

Debian packages will install this automatically.