SilverLeague\LogViewer\Model\LogEntry
A LogEntry is a set of data provided from Monolog via the DataObjectHandler
- Author: Robbie Averill <robbie@averill.co.nz>
Synopsis
class LogEntry
extends DataObject
implements
PermissionProvider
{
- // members
- private static string $table_name = 'LogEntry';
- private static array $db = ;
- private static array $summary_fields = ;
- private static bool $cron_enabled = true;
- private static string $cron_schedule = '0 4 * * *';
- private static integer $max_log_age = 30;
- private static integer $minimum_log_level = 300;
- // methods
- public void providePermissions()
- public void getCMSFields()
- public void canCreate()
- public void canEdit()
- public void canDelete()
- public void canView()
Hierarchy
Extends
- SilverStripe\ORM\DataObject
Implements
- SilverStripe\Security\PermissionProvider
Members
private
- $cron_enabled
—
SilverLeague\LogViewer\Model\bool
Whether the cron functionality should run. This does not affect use as a BuildTask. - $cron_schedule
—
string
How often the cron should run (default: 4am daily) - $db
- $max_log_age
—
int
The maximum age in days for a LogEntry before it will be removed - $minimum_log_level
—
integer
Which Monolog\Logger levels (numeric) to start handling from (see class for examples) - $summary_fields
- $table_name
Methods
public
- canCreate() — Log entries are created programmatically, they should never be created manually
- canDelete()
- canEdit() — We should never edit log entries
- canView()
- getCMSFields() — Format the log entry as JSON
- providePermissions() — Permissions