Author Topic: Activity Logs  (Read 29 times)

skipper

  • Active Member
  • ***
  • Posts: 79
  • Karma: +0/-0
    • ThePeepz.com
Activity Logs
« on: May 15, 2017, 04:17:34 PM »
Activity on your site is logged for 30 days then they are automatically deleted.

I have noticed my activity logs for the members are not deleting after 30 days. Mine go back at least 45 days, is this normal or is there something that may not be happening. Thanks.
Thepeepz.com
ThePeepz.com/chat
The-Peepz.chatovod.com

maverick

  • Administrator
  • Veteran Member
  • *****
  • Posts: 2943
  • Karma: +210/-7
    • Maverick Webworks
Re: Activity Logs
« Reply #1 on: May 15, 2017, 05:59:29 PM »
From what I remember they work like so .... the cron jobs clear the site activity logs which is run once a month, and clears logs that are older than 31 days.

This cron job is located in the  tools/cron/jobs/m/ folder and the code is as follows:
Code: [Select]
$query="DELETE FROM `{$dbtable_prefix}site_log` WHERE `time`<DATE_SUB('".gmdate('YmdHis')."',INTERVAL 31 DAY)";
if (!($res=@mysql_query($query))) {trigger_error(mysql_error(),E_USER_ERROR);}
return true;

Therefore after several weeks of the logs being last cleared it may contain some that older than 30 days until the next time the cron job is run. If the logs weren't being cleared at all (in the event your cron jobs weren't functioning properly) you would have logs dating well beyond 45 days.

Fusion Responsive Template & Free Mods
http://www.maverickwebworks.com
DO NOT PM me asking for personal help. Post your problem or request in the forums so the entire community can contribute and benefit.