Invision Byte: Adjust the log pruning schedule - IP.Board 3.x - Tutorials - Invision Byte

Jump to content

Welcome to Invision Byte

Welcome to Invision Byte, like most online communities you must register to view or post in our community, but don't worry this is a simple free process that requires minimal information. Take advantage of it immediately, Register Now or Sign In.

  • Start new topics and reply to others
  • Subscribe to topics and forums to get automatic updates
  • Purchase one of the products available and quickly receive support for it!
  • View and use the shoutbox to communicate
  • Get your own profile and make new friends
  • Customize your experience here
Guest Message by DevFuse

User is offline Author

Find Posts Tutorial info

  • Added on: Nov 06 2011 02:26 PM
  • Views: 2575

Collaboration


  Like

Adjust the log pruning schedule

Description: A quick simple tweak to adjust the log pruning from thirty days to another number
IP.Board provides options (System Settings > Advanced > Log Pruning) to enable / disable pruning various logs such as spider logs, database error logs, spam logs etc.

The only issue some administrators may have is that thirty days may be too long, or in some rare cases not enough but again not enough to justify not pruning them.

A simple tweak is possible to adjust the pruning schedule. :)

Connect via FTP or your hosts file manager and open admin/applications/core/tasks/logprune.php

Around line 34, find...
protected $deleteTime = 2592000;


Replace that line with one of the following, depending on what you require.

14 days
protected $deleteTime = 1209600;


7 days
protected $deleteTime = 604800;


3 days
protected $deleteTime = 259200;


Save the change. The settings description will still indicate 30 days but the actual pruning will take place at the days interval you have specified. :) , remember this change will effect them all so you may wish to disable any pruning you do not want to occur at that interval.
0
Powered by Tutorials 1.2.2 © 2017, by Michael McCune