{"id":19490196,"url":"https://github.com/silverleague/silverstripe-logviewer","last_synced_at":"2025-09-03T02:42:21.169Z","repository":{"id":57050838,"uuid":"78150986","full_name":"silverleague/silverstripe-logviewer","owner":"silverleague","description":"View your SilverStripe logs from inside the CMS","archived":false,"fork":false,"pushed_at":"2023-03-05T23:21:56.000Z","size":754,"stargazers_count":11,"open_issues_count":4,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-30T12:58:19.750Z","etag":null,"topics":["logs","logviewer","silverleague-modules","silverstripe","silverstripe-4"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/silverleague.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-05T21:47:58.000Z","updated_at":"2024-11-19T09:57:02.000Z","dependencies_parsed_at":"2024-11-10T21:11:46.605Z","dependency_job_id":null,"html_url":"https://github.com/silverleague/silverstripe-logviewer","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/silverleague/silverstripe-logviewer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silverleague%2Fsilverstripe-logviewer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silverleague%2Fsilverstripe-logviewer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silverleague%2Fsilverstripe-logviewer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silverleague%2Fsilverstripe-logviewer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/silverleague","download_url":"https://codeload.github.com/silverleague/silverstripe-logviewer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/silverleague%2Fsilverstripe-logviewer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273381913,"owners_count":25095327,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-03T02:00:09.631Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["logs","logviewer","silverleague-modules","silverstripe","silverstripe-4"],"created_at":"2024-11-10T21:11:42.764Z","updated_at":"2025-09-03T02:42:21.147Z","avatar_url":"https://github.com/silverleague.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# silverleague/silverstripe-logviewer\n\n[![Build Status](https://travis-ci.org/silverleague/silverstripe-logviewer.svg?branch=master)](https://travis-ci.org/silverleague/silverstripe-logviewer) [![Code quality](https://scrutinizer-ci.com/g/silverleague/silverstripe-logviewer/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/silverleague/silverstripe-logviewer/?branch=master) [![Code coverage](https://codecov.io/gh/silverleague/silverstripe-logviewer/branch/master/graph/badge.svg)](https://codecov.io/gh/silverleague/silverstripe-logviewer) [![Latest Stable Version](https://poser.pugx.org/silverleague/logviewer/version)](https://packagist.org/packages/silverleague/logviewer) [![Latest Unstable Version](https://poser.pugx.org/silverleague/logviewer/v/unstable)](//packagist.org/packages/silverleague/logviewer)\n\nShow your SilverStripe log entries in the CMS.\n\n## Requirements\n\n* PHP 5.6+\n* SilverStripe ^4.0\n* Composer\n\n## Installation\n\nInstall with composer:\n\n```shell\ncomposer require silverleague/logviewer\n```\n\nThis is a plug and play module. Simply install, then run a `dev/build` and flush:\n\n```shell\nsake dev/build flush=1\n```\n\nYou will now see a \"Logs\" tab in the CMS:\n\n![Preview](docs/images/preview-list.png)\n\n## Configuration\n\nThere are a few configuration options for this module. These can be modified in your YAML configuration, for example - `mysite/_config/logviewer.yml`:\n\n```yaml\n---\nName: mysitelogviewer\n---\n# Configuration for the cleanup task\nSilverLeague\\LogViewer\\Model\\LogEntry:\n  # Whether the cleanup task should be run by a cron task (you need to figure the cron yourself)\n  # Type: bool\n  cron_enabled: true\n  # How often the cron should run (default: 4am daily)\n  # Type: string (a cron expression)\n  cron_schedule: 0 4 * * *\n  # The maximum age in days for a LogEntry before it will be removed by the cleanup task\n  # Type: int\n  max_log_age: 30\n  # Which Monolog\\Logger levels (numeric) to start handling from (see class for examples)\n  minimum_log_level: 300 # WARNING\n```\n\nWhile 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).\n\n### Testing\n\nThere 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.\n\nThe screenshot above is a result of having run it, using the configuration in the example above.\n\n## Cleaning up\n\nAs 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.\n\nYou can run the task manually from the command line using `sake` or [`ssconsole`](https://github.com/silverleague/silverstripe-console):\n\n```shell\n# With sake:\nvendor/bin/sake dev/tasks/RemoveOldLogEntriesTask\n\n# With ssconsole:\nssconsole dev:tasks:remove-old-log-entries\n```\n\nYou 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.\n\n## Support\n\nIf 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).\n\nEnsure 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`.\n\n| Role          | Name                                              |\n| ------------- | ------------------------------------------------- |\n| Maintainer    | [robbieaverill](https://github.com/robbieaverill) |\n| Co-maintainer | [Firesphere](https://github.com/Firesphere)       |\n| Advocate      | [zanderwar](https://github.com/zanderwar)         |\n\n## Contributing\n\nPlease see [the contributing guide](CONTRIBUTING.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsilverleague%2Fsilverstripe-logviewer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsilverleague%2Fsilverstripe-logviewer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsilverleague%2Fsilverstripe-logviewer/lists"}