PHPackages                             silverleague/logviewer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. silverleague/logviewer

ActiveSilverstripe-vendormodule[Logging &amp; Monitoring](/categories/logging)

silverleague/logviewer
======================

View your SilverStripe logs from inside the CMS

1.0.0(8y ago)114.6k5[3 issues](https://github.com/silverleague/silverstripe-logviewer/issues)[1 PRs](https://github.com/silverleague/silverstripe-logviewer/pulls)MITPHP

Since Jan 7Pushed 3y ago3 watchersCompare

[ Source](https://github.com/silverleague/silverstripe-logviewer)[ Packagist](https://packagist.org/packages/silverleague/logviewer)[ Docs](https://github.com/silverleague/silverstripe-logviewer)[ RSS](/packages/silverleague-logviewer/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (6)Versions (10)Used By (0)

silverleague/silverstripe-logviewer
===================================

[](#silverleaguesilverstripe-logviewer)

[![Build Status](https://camo.githubusercontent.com/94a683b1e2704d99cdc9e3a133ac651ee66a958fe12a2553dea4d615ba45743b/68747470733a2f2f7472617669732d63692e6f72672f73696c7665726c65616775652f73696c7665727374726970652d6c6f677669657765722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/silverleague/silverstripe-logviewer) [![Code quality](https://camo.githubusercontent.com/65d41ef6dead09df4f1f2e3ec7815e2dcf0587502eafe341d5b28e74062839d1/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f73696c7665726c65616775652f73696c7665727374726970652d6c6f677669657765722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/silverleague/silverstripe-logviewer/?branch=master) [![Code coverage](https://camo.githubusercontent.com/90583aab5e33f44c1e25b821e2cc57ffa444a8c933b3a50066182d67c0033ace/68747470733a2f2f636f6465636f762e696f2f67682f73696c7665726c65616775652f73696c7665727374726970652d6c6f677669657765722f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/silverleague/silverstripe-logviewer) [![Latest Stable Version](https://camo.githubusercontent.com/f61e1fb1e114f2d92503807f346495812aac18ecf4c46f9870373cc4a8979992/68747470733a2f2f706f7365722e707567782e6f72672f73696c7665726c65616775652f6c6f677669657765722f76657273696f6e)](https://packagist.org/packages/silverleague/logviewer) [![Latest Unstable Version](https://camo.githubusercontent.com/7078df817321af2fb4f8de7d9627ea53ae08b2f9168f5b345bf9520e9d8b20d7/68747470733a2f2f706f7365722e707567782e6f72672f73696c7665726c65616775652f6c6f677669657765722f762f756e737461626c65)](//packagist.org/packages/silverleague/logviewer)

Show your SilverStripe log entries in the CMS.

Requirements
------------

[](#requirements)

- PHP 5.6+
- SilverStripe ^4.0
- Composer

Installation
------------

[](#installation)

Install with composer:

```
composer require silverleague/logviewer
```

This is a plug and play module. Simply install, then run a `dev/build` and flush:

```
sake dev/build flush=1
```

You will now see a "Logs" tab in the CMS:

[![Preview](docs/images/preview-list.png)](docs/images/preview-list.png)

Configuration
-------------

[](#configuration)

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

```
---
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).

### Testing

[](#testing)

There is an [example `BuildTask` in this repository](docs/examples/CreateLogsTask.php) which you can use to generate one of every PSR-3 log level for the sake of testing.

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

Cleaning up
-----------

[](#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.

You can run the task manually from the command line using `sake` or [`ssconsole`](https://github.com/silverleague/silverstripe-console):

```
# 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.

Support
-------

[](#support)

If you encounter a problem with our module then please let us know by raising an issue on our [issue tracker](https://github.com/silverleague/silverstripe-logviewer/issues).

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`.

RoleNameMaintainer[robbieaverill](https://github.com/robbieaverill)Co-maintainer[Firesphere](https://github.com/Firesphere)Advocate[zanderwar](https://github.com/zanderwar)Contributing
------------

[](#contributing)

Please see [the contributing guide](CONTRIBUTING.md) for more information.

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 91.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~104 days

Recently: every ~202 days

Total

9

Last Release

2576d ago

Major Versions

0.3.0 → 1.0.0-alpha12017-04-02

### Community

Maintainers

![](https://www.gravatar.com/avatar/8497c885d84e4bf94b8e6136292aa602124a50bbbb4a14ab00e1423f232e7663?d=identicon)[Firesphere](/maintainers/Firesphere)

![](https://www.gravatar.com/avatar/04057079b9a8a168a9e8c40cf7bac17f05047255c48b71b63fc610db06f096cb?d=identicon)[robbieaverill](/maintainers/robbieaverill)

![](https://www.gravatar.com/avatar/f9ffb8a23222134759e16951844017faa8b803ba54bc1f2b36eabc8421ab776d?d=identicon)[zanderwar](/maintainers/zanderwar)

---

Top Contributors

[![robbieaverill](https://avatars.githubusercontent.com/u/5170590?v=4)](https://github.com/robbieaverill "robbieaverill (74 commits)")[![Firesphere](https://avatars.githubusercontent.com/u/680570?v=4)](https://github.com/Firesphere "Firesphere (4 commits)")[![zanderwar](https://avatars.githubusercontent.com/u/13566916?v=4)](https://github.com/zanderwar "zanderwar (3 commits)")

---

Tags

logslogviewersilverleague-modulessilverstripesilverstripe-4logerrorsilverstripecmsmonolog

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/silverleague-logviewer/health.svg)

```
[![Health](https://phpackages.com/badges/silverleague-logviewer/health.svg)](https://phpackages.com/packages/silverleague-logviewer)
```

###  Alternatives

[phptek/sentry

Sentry.io integration for SilverStripe. Binds Sentry.io to SilverStripe's error &amp; exception handling subsystem.

15203.5k3](/packages/phptek-sentry)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
