Skip to content

Feature: laravel.log summary #454

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

jdias95
Copy link

@jdias95 jdias95 commented Jun 5, 2025

Hello, I developed this feature that we will be using in multiple projects, so I figured I'd submit a PR to the package and see what others think.

What's New:

  • Added a new command log-viewer:summary which will take the last 1000 logs in laravel.log, count them, keep track of the first and last dates each one was logged, and create a new log-summary.log file
  • Added a new LogSummary class that extends Log.php in order to display the summary in the Log Viewer

Note that a Laravel project will still need to have

LogViewer::extend('summary', \Opcodes\LogViewer\Logs\LogSummary::class);

in AppServiceProvider.php in order for this feature to work. I wasn't sure if there is a way to include this in the PR so this can be avoided. Please let me know if this can be added or if any other alterations should be made.

Known Issue:

  • Though the severity levels are the same as laravel.log and appear correctly in the 'Severity' column, they cannot be used to filter the logs via the dropdown in the UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant