Brand New Log Viewer For Laravel

Share this post on:
Illustration of a log file with coding brackets and the text 'LOG' in orange, accompanied by the title 'Brand New Log Viewer for Laravel' and the Laravel logo above it
  • Presenting the recently released Log Viewer for Laravel. Open source, incredibly feature-rich, quick, and elegant. What else are you need of ?
  • Finding what you’re looking for will no longer require you to read the raw Laravel log files (as well as other log kinds).
  • You can search, filter, and quickly understand your Laravel logs with Log Viewer, which also makes it easy to inspect individual log entries. It is simple to install and free.

Features: –

  • Examine other log kinds, including those from Horizon, Apache, Nginx
    Redis, Supervisor, Postgres, and more
  • Look through the logs
  • Sort by log level (debug, info, error, etc.)
  • Shareable links to specific log entries
  • Dark mode
  • Mobile-friendly user interface
  • Multiple host support
  • Keyboard accessibility
  • Log files can be downloaded and deleted via the user interface
  • Support for Horizon logs (up to Horizon v9.20)
  • File, folder, and log entry API access
  • Emails sent to the logs with previews

Usage:-

To install the package via composer, Run:

• composer require opcodesio/log-viewer

After installing the package, publish the front-end assets by running:

• php artisan log-viewer:publish 

Once the installation is complete, you will be able to access Log Viewer
directly in your browser.

  • (for example: https:// project-location /log-viewer)

Important Features : –

  1. Adaptable Views
Laravel log viewer interface displaying a list of log files on the left and detailed log entries on the right. Log levels are categorized by severity, such as Debug, Info, Warning, and Error, with corresponding color codes. Each log entry includes level, timestamp, environment, and description


This Log Viewer’s highly customisable UI is one of its best qualities. The
displays can be customized to show the log data that is most pertinent to your project. Various log levels, including info, error, warning, and more, are supported by the viewer and are color coded for convenience.

The image shows a screenshot of a "Log Viewer" interface. At the top, it displays a title "Log Viewer" with a GitHub icon next to it. Below the title, there is a section labeled "Log files on Local" with an expandable folder named "root." Within this folder, a single log file is listed, titled "laravel.log" with a size of 598.81 KB. There is an option to sort the logs by "Newest first" on the right side of the folder section. The interface appears to be part of a log management or viewing tool used for monitoring Laravel log files
  • Pagination & Sorting: By default, logs are paginated, making it simple to browse through big log files. Sorting by log level or date makes it easier to identify problems fast.

The image shows a search bar interface in a log viewing tool. On the left, there is a button labeled "75 entries in Error" with a dropdown arrow, indicating that the log is filtered to display 75 error entries. To the right, there is a search field where users can type their search queries. Inside the search bar, there is placeholder text that says "Search in 'laravel.log'." Next to the search bar, there are two small icons: a circular arrow for refreshing and a gear icon, likely for accessing additional settings or filters. This interface appears to allow filtering and searching within the Laravel log file to locate specific entries.
  • You can easily isolate particular events or error messages by using the search feature, which allows you to filter log entries by keywords.
  1. More Complex Filtering

Out of the box, this program offers sophisticated filtering features. Date ranges, log levels, or even custom tags that you define in your application can be used to filter logs.

The image shows a portion of an interface related to log entries. It includes two dropdown options: one labeled "Newest first" and another labeled "25 items per page." These options indicate the sorting order and the number of log entries displayed per page. Below these dropdowns, there appears to be a section showing a count of log entries, with a number "74" displayed on the right side, next to a link icon. This likely indicates the current selection or number of filtered log entries in the view. The interface seems designed to help users manage, sort, and navigate through log entries efficiently


More Complex Use Cases: –

Slack integration: The Log Viewer can be integrated with Slack or other notification channels for apps that need real-time notifications. Using this viewer in conjunction with Laravel’s logging capabilities, you may create real-time warnings for important problems so that your team can act promptly.

Please visit the Log Viewer Documentation to Learn about
configuring Log Viewer to your needs.