2017 © Pedro Peláez
 

silverstripe-vendormodule logviewer

View your SilverStripe logs from inside the CMS

image

silverleague/logviewer

View your SilverStripe logs from inside the CMS

  • Tuesday, May 1, 2018
  • by robbieaverill
  • Repository
  • 3 Watchers
  • 6 Stars
  • 182 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 3 Open issues
  • 14 Versions
  • 125 % Grown

The README.md

silverleague/silverstripe-logviewer

Build Status Code quality Code coverage Latest Stable Version Latest Unstable Version, (*1)

Show your SilverStripe log entries in the CMS., (*2)

Requirements

  • PHP 5.6+
  • SilverStripe ^4.0
  • Composer

Installation

Install with composer:, (*3)

composer require silverleague/logviewer

This is a plug and play module. Simply install, then run a dev/build and flush:, (*4)

sake dev/build flush=1

You will now see a "Logs" tab in the CMS:, (*5)

Preview, (*6)

Configuration

There are a few configuration options for this module. These can be modified in your YAML configuration, for example - mysite/_config/logviewer.yml:, (*7)

---
Name: mysitelogviewer
---
# Configuration for the cleanup task
SilverLeague\LogViewer\Model\LogEntry:
  # Whether the cleanup task should be run by a cron task (you need to figure the cron yourself)
  # Type: bool
  cron_enabled: true
  # How often the cron should run (default: 4am daily)
  # Type: string (a cron expression)
  cron_schedule: 0 4 * * *
  # The maximum age in days for a LogEntry before it will be removed by the cleanup task
  # Type: int
  max_log_age: 30
  # Which Monolog\Logger levels (numeric) to start handling from (see class for examples)
  minimum_log_level: 300 # WARNING

While this is a copy of the default configuration, if the default configuration hadn't already existed or was different then this configuration would tell LogViewer that you do want it to clean up log entries older than 30 days on a cron schedule at 4am each day. You also only want to keep logs that are "WARNING" level or higher (see Monolog\Logger for all available levels)., (*8)

Testing

There is an example BuildTask in this repository which you can use to generate one of every PSR-3 log level for the sake of testing., (*9)

The screenshot above is a result of having run it, using the configuration in the example above., (*10)

Cleaning up

As mentioned previously, if you have an actively running silverstripe/crontask module already, the RemoveOldLogEntriesTask will run by default at 4am every morning and will remove log entries that are older than 30 days., (*11)

You can run the task manually from the command line using sake or ssconsole:, (*12)

# With sake:
vendor/bin/sake dev/tasks/RemoveOldLogEntriesTask

# With ssconsole:
ssconsole dev:tasks:remove-old-log-entries

You can also remove all log entries entirely from the Logs interface in the admin area, by clicking "Clear all". This will clear all logs, not just those older than 30 days., (*13)

Support

If you encounter a problem with our module then please let us know by raising an issue on our issue tracker., (*14)

Ensure you tell us which version of this module you are using, as well as which versions of PHP and SilverStripe framework you are using. If you aren't sure, you can find out by running the following commands from your command line: php -v, composer show silverleague/logviewer and composer show silverstripe/framework., (*15)

Role Name
Maintainer robbieaverill
Co-maintainer Firesphere
Advocate zanderwar

Contributing

Please see the contributing guide for more information., (*16)

The Versions

01/05 2018

dev-master

9999999-dev https://github.com/silverleague/silverstripe-logviewer

View your SilverStripe logs from inside the CMS

  Sources   Download

MIT

The Requires

 

The Development Requires

by Robbie Averill

log monolog cms silverstripe error

04/04 2018

1.0.x-dev

1.0.9999999.9999999-dev https://github.com/silverleague/silverstripe-logviewer

View your SilverStripe logs from inside the CMS

  Sources   Download

MIT

The Requires

 

The Development Requires

by Robbie Averill

log monolog cms silverstripe error

04/04 2018

1.0.0

1.0.0.0 https://github.com/silverleague/silverstripe-logviewer

View your SilverStripe logs from inside the CMS

  Sources   Download

MIT

The Requires

 

The Development Requires

by Robbie Averill

log monolog cms silverstripe error

26/10 2017

1.0.0-beta1

1.0.0.0-beta1 https://github.com/silverleague/silverstripe-logviewer

View your SilverStripe logs from inside the CMS

  Sources   Download

MIT

The Requires

 

The Development Requires

by Robbie Averill

log monolog cms silverstripe error

03/09 2017

dev-pulls/1.0/webpack-and-json-formatting

dev-pulls/1.0/webpack-and-json-formatting https://github.com/silverleague/silverstripe-logviewer

View your SilverStripe logs from inside the CMS

  Sources   Download

MIT

The Requires

 

The Development Requires

by Robbie Averill

log monolog cms silverstripe error

03/09 2017

dev-pulls/1.0/model-admin-icon

dev-pulls/1.0/model-admin-icon https://github.com/silverleague/silverstripe-logviewer

View your SilverStripe logs from inside the CMS

  Sources   Download

MIT

The Requires

 

The Development Requires

by Robbie Averill

log monolog cms silverstripe error

03/09 2017

dev-pulls/1.0/fix-logentry

dev-pulls/1.0/fix-logentry https://github.com/silverleague/silverstripe-logviewer

View your SilverStripe logs from inside the CMS

  Sources   Download

MIT

The Requires

 

The Development Requires

by Robbie Averill

log monolog cms silverstripe error

02/04 2017

1.0.0-alpha1

1.0.0.0-alpha1 https://github.com/silverleague/silverstripe-logviewer

View your SilverStripe logs from inside the CMS

  Sources   Download

MIT

The Requires

 

The Development Requires

by Robbie Averill

log monolog cms silverstripe error

31/01 2017

0.3.0

0.3.0.0 https://github.com/silverleague/silverstripe-logviewer

View your SilverStripe logs from inside the CMS

  Sources   Download

MIT

The Requires

 

The Development Requires

by Robbie Averill

log monolog cms silverstripe error

23/01 2017

0.2.2

0.2.2.0 https://github.com/silverleague/silverstripe-logviewer

View your SilverStripe logs from inside the CMS

  Sources   Download

MIT

The Requires

 

by Robbie Averill

log monolog cms silverstripe

23/01 2017

dev-feature/format_logentries_in_admin_view

dev-feature/format_logentries_in_admin_view https://github.com/silverleague/silverstripe-logviewer

View your SilverStripe logs from inside the CMS

  Sources   Download

MIT

The Requires

 

by Robbie Averill
by Simon Erkelens

log monolog cms silverstripe

20/01 2017

0.2.1

0.2.1.0 https://github.com/silverleague/silverstripe-logviewer

View your SilverStripe logs from inside the CMS

  Sources   Download

MIT

The Requires

 

by Robbie Averill

log monolog cms silverstripe

09/01 2017

0.2.0

0.2.0.0 https://github.com/silverleague/silverstripe-logviewer

View your SilverStripe logs from inside the CMS

  Sources   Download

MIT

The Requires

 

by Robbie Averill

log monolog cms silverstripe

07/01 2017

0.1.0

0.1.0.0 https://github.com/silverleague/silverstripe-logviewer

View your SilverStripe logs from inside the CMS

  Sources   Download

MIT

The Requires

 

by Robbie Averill

log monolog cms silverstripe