-
Notifications
You must be signed in to change notification settings - Fork 1
Description
silverleague/silverstripe-logviewer
Specification: https://silverleague.github.io/complete/silverstripe-logviewer
Introduction
As a developer you may not be as aware of SilverStripe logging as you may want to be.
This module intends to add a Monolog logger which will log to a database table that can be rendered to an area of the CMS admin for easy viewing.
Why?
Because logs often go unnoticed, and since the 4.x framework has Monolog bundled with it, we can easily add a new LoggerInterface
to push logs to the database. From here, they can easily be displayed in the admin as a GridField or similar.
Details
A new CMS section which displays a GridFields listing all log entries stored.
Columns could be: log content, date/time, log level.
Provide the filter to certain log levels, and allow the GridField to be filterable so I could search for "Deprecated" for example, or to filter by a date range. Handled by GridField.
We would implement a BuildTask
and/or a CronTask
which would clear the logs that are older than x days (7? 14? 30?). A button in the CMS admin interface would also allow you to clear old logs.
Export to CSV functionality would be useful as well. Handled by GridField.
Functionality
- Add new CMS interface to the admin area
- Create
DataObject
representing a log entry - Add and configure new monolog
LoggerInterface
to push the log into a newLogEntry
(for example) - Implement filterable/searchable/orderable GridField in the CMS admin
- Add
BuildTask
/CronTask
/both to remove old log entries automatically: AddBuildTask
/CronTask
/both to remove old log entries automatically silverstripe-logviewer#3 - Add button to CMS to remove all log entries manually: Add button to CMS to remove old log entries manually silverstripe-logviewer#4
- Configure the minimum log level to handle: Add SilverStripe config handling for which log levels should be handled silverstripe-logviewer#2