Download the PHP package danilovl/log-viewer-bundle without Composer

On this page you can find all versions of the php package danilovl/log-viewer-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package log-viewer-bundle

phpunit downloads latest Stable Version license

LogViewerBundle

This Symfony bundle provides a user-friendly interface and API for viewing application logs (Monolog). It supports log reading through standard PHP methods as well as a high-performance Go-based parser.

Features

Screenshots

Explore the user interface and features of the Log Viewer:

Requirements

Installation

  1. Install the package via Composer:

  2. Register the bundle in config/bundles.php (if not done automatically):

  3. Run the following command to install the bundle assets:

  4. Include the routes in config/routes.yaml:

Configuration

Create a configuration file config/packages/danilovl_log_viewer.yaml.

1. Full Configuration Reference

This example shows all available configuration keys with their structure and default values.

2. Real-world Configuration Example

A practical example for a typical production environment.

Note: for ssh and sftp types, the ssh2 PHP extension is required.

Log Notifications (Watcher)

To enable real-time notifications for new log entries matching your rules, you need to run the watcher command in the background.

The watcher uses the symfony/notifier component. Make sure you have configured your Notifier transports in your Symfony application.

Configuring Notifier Channels

To use the channels defined in your configuration, you need to configure the corresponding transports in your Symfony application's config/packages/framework.yaml.

1. Slack Example

Install the Slack notifier: composer require symfony/slack-notifier

Channel in rule: chat/slack

2. Telegram Example

Install the Telegram notifier: composer require symfony/telegram-notifier

Channel in rule: chat/telegram

3. Email Example

Make sure the mailer component is configured:

Note: For email notifications to work through the Notifier, you might also need to set up a channel_policy or ensure your AdminNotification logic (if customized) supports it. By default, the bundle sends a standard Notification with the specified channels.

Refer to the official Symfony Notifier documentation for detailed transport configuration (DSN) for each provider.

Built-in Parsers

The following parsers are available by default:

Regex Templates

The bundle includes a curated list of popular regular expression templates to help you find common issues quickly. Each template provides optimized patterns for both PHP and Go (if the Go parser is enabled).

Available template categories:

You can select these templates from the dropdown menu in the search bar.

Usage (Dashboard)

After installation and route configuration, the dashboard will be available at: /danilovl/log-viewer

User Interface Features

Development (Assets)

The bundle's assets are pre-built and included in the package. If you want to customize the frontend:

  1. Install dependencies:

  2. Build for production:

Cache Clear

To clear the bundle cache (including log statistics and parser detection), run the following command:

API Endpoints

All API endpoints are prefixed with /danilovl/log-viewer/api.

1. Configuration

GET /config Returns the current bundle configuration (available levels, channels, etc.).

2. Folder Structure

GET /structure Returns a hierarchical structure of folders and log files.

GET /folders Returns a flat list of folders containing log files with their total count. Response: { "folders": [...], "totalCount": 0 }

3. Log Entries

GET /entries Returns log entries for a specific source with pagination. Query parameters:

GET /file-content Returns raw file content with pagination and line jumping. Query parameters:

GET /entries/new Returns only new log entries across specified sources (used for real-time updates). Query parameters:

GET /global-search Returns log entries for multiple sources with combined sorting. Query parameters:

GET /entries-count Returns the total count of entries for the given filters. Query parameters:

Response: { "totalCount": 0 }

4. Statistics

GET /stats Returns statistics for a specific file (total count, distribution by levels and channels). Query parameters:

GET /dashboard-stats Summary statistics across all sources for the dashboard. Query parameters:

5. File Management

DELETE /delete Deletes a specific log file. Query parameters:

GET /download Downloads a specific log file. Query parameters:

Events

The bundle provides several events that allow you to customize its behavior without modifying the core logic. You can use these events to filter logs, change file permissions, or modify log entries.

1. LogViewerDataEvent

Dispatched when collecting data for both folder structure and flat file list.

2. LogViewerEntriesEvent

Dispatched after fetching log entries for a specific file, but before they are sent to the frontend.

3. LogViewerDownloadEvent & LogViewerDeleteEvent

Dispatched before downloading or deleting a log file.

Example of an Event Subscriber:

Custom Log Parsers

You can create your own log parser if your logs are not in the standard Monolog format.

1. Create a Parser Class

Implement the Danilovl\LogViewerBundle\Interfaces\LogInterfaceParser:

2. Register the Parser

If you use standard Symfony autowiring and autoconfiguration, your parser will be automatically registered and tagged with danilovl.log_viewer.parser.

3. Use the Parser in Configuration

Update your danilovl_log_viewer.yaml:

Or set it as the default:

License

The LogViewerBundle is open-sourced software licensed under the MIT license.


All versions of log-viewer-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^8.5
symfony/asset Version ^8.0
symfony/framework-bundle Version ^8.0
symfony/notifier Version ^8.0
symfony/process Version ^8.0
symfony/twig-bundle Version ^8.0
symfony/yaml Version ^8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package danilovl/log-viewer-bundle contains the following files

Loading the files please wait ...