SilverLeague\LogViewer\Task\RemoveOldLogEntriesTask
Remove old LogEntry records from the database
- Author: Robbie Averill <robbie@averill.co.nz>
Synopsis
class RemoveOldLogEntriesTask
extends BuildTask
implements
CronTask
{
- // members
- private static string $segment = 'RemoveOldLogEntriesTask';
- protected string $title = 'Remove LogEntry records older than a "n" days';
- protected string $description = 'Removes LogEntry records that are older than the configured `LogViewer.max_log_age`.';
- // methods
- public bool run()
- public bool process()
- public void getSchedule()
- public int getMaxAge()
- public bool getCronEnabled()
- protected bool removeOldLogs()
Hierarchy
Extends
- SilverStripe\Dev\BuildTask
Implements
- SilverStripe\CronTask\Interfaces\CronTask
Members
private
-
$segment
{@inheritDoc}
protected
-
$description
{@inheritDoc} -
$title
{@inheritDoc}
Methods
protected
- removeOldLogs() — Remove LogEntry records older than the LogViewer.max_log_age days
public
- getCronEnabled() — Return whether the cron functionality is enabled from configuration
- getMaxAge() — Get the maximum age allowed for a LogEntry from configuration
- getSchedule() — {@inheritDoc}
- process() — CronTask implementation - can be disabled with YAML configuration
- run() — BuildTask implementation