Download the PHP package moe-mizrak/laravel-log-reader without Composer

On this page you can find all versions of the php package moe-mizrak/laravel-log-reader. 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 laravel-log-reader

Laravel Log Reader

Lightweight Laravel package for searching and filtering logs from both file and database sources.

This package provides the core log reading functionality used by the Laravel MCP Log (MCP tool for Laravel log analysing with AI.).

Installation

You can install the package (that you created with this template) via composer:

You can publish and run the migrations with:

Usage

You can use the package to read, search, and filter logs from both file and database sources.

If your logs are stored in files (laravel.log), in the config file (laravel-log-reader.php) set the driver to file as:

And set the log file path as:

And also you can set a limit, chunk size as:

Service provider automatically resolves the correct log reader (FileLogReader) and you can use it as:

If your logs are stored in database (log_entries table), in the config file (laravel-log-reader.php) set the driver to db as:

Set the connection and table name as:

And set the database columns mapping and searchable columns as:

And also you can set a limit, chunk size as:

And you can use it as:

Note: You can chain the search, filter, and chunk methods in any order before calling execute. The search method performs a search on searchable fields (like message, context, etc.) based on the provided query (in config we have searchable_columns so that it can be customized).

TODO

  • [ ] Add a log_insights migration/table which will be a normalized, summarized, and searchable table.
  • It unifies different log mechanisms into a single canonical format, enabling faster lookups over large data.
  • A background task should sync new log data periodically, basically everyday it summarizes the previous day's logs and inserts them into log_insights.
  • Be aware that summarization may lose some details (e.g., exact errors or stack traces).
  • [ ] Add support for cloud log readers (AWS CloudWatch, Azure Monitor, Google Cloud Logging).
  • [ ] Add streaming responses, either as a parameter to search/filter methods or as a new method like searchStream using cursors, yields, or $builder->lazy($chunkSize).
  • [ ] Use a cheap/free model to summarize large log files before search/filter (experimental approach).
  • [ ] Refine LOG_PATTERN in FileLogReader to handle more real-world log formats.
  • [ ] Move user_id, request_id, and ip_address into dedicated columns instead of using the extra field.

Contributing

Your contributions are welcome! If you'd like to improve this project, simply create a pull request with your changes. Your efforts help enhance its functionality and documentation.

If you find this project useful, please consider ⭐ it to show your support!

Authors

This project is created and maintained by Moe Mizrak.

License

Laravel Package Template is an open-sourced software licensed under the MIT license.


All versions of laravel-log-reader with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
spatie/laravel-data Version ^4.17
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 moe-mizrak/laravel-log-reader contains the following files

Loading the files please wait ...