New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

yzen.dev/mono-processor

This Processor will display in the logs bread crumbs by which you can more quickly and accurately identify the cause of the error.
6,316 11
Install
composer require yzen.dev/mono-processor
Latest Version:1.1
PHP:^7.2 || ^8.0
Laravel:9
Older releases:5 – 8
License:MIT
Last Updated:Feb 1, 2023
Links: GitHub  ·  Packagist
Maintainer: yzen.dev

MonoProcessor - Supplement your logging with auxiliary information on error

Packagist Version Packagist Downloads Packagist Downloads

This Processor will display in the logs bread crumbs by which you can more quickly and accurately identify the cause of the error.

:scroll: Installation

The package can be installed via composer:

composer require yzen.dev/mono-processor

To get started, first publish MonoProcessor config and view files into your own project:

php artisan vendor:publish --provider "MonoProcessor\ServiceProvider"

:scroll: Version Compatibility

Laravel MonoProcessor
v8.x v1.x
v7.x v0.3.x

:scroll: Features

  • Extends standard logs
  • Collection of SQL requests
  • Collection of HTTP requests
  • Authorized user information
  • Route information
  • Git information
  • PHP information
  • Memory information

:scroll: Usage

To use MonoProcessor you need to add the following tap to your logging.php config:

    'channels' => [
        'daily' => [
            'driver' => 'daily',
            'path' => storage_path('logs/laravel.log'),
            'level' => 'debug',
            'days' => env('LOG_DAYS', 7),
            'tap' => [
                MonoProcessor\MonoProcessors::class
            ]
        ]
    ]

As a result, you will get approximately the following information after the stack: example

:scroll: Configuration

Processor Description
stacktrace Stack output when an error occurs
memoryPeak Memory peak at runtime
git Git branch and Git commit SHA
phpinfo php info (version)
json_format Output of additional information in the format JSON_PRETTY_PRINT
command Listen console commands
levels levels (DEBUG, INFO, NOTICE, WARNING, ERROR, CRITICAL, ALERT, EMERGENCY)
uuid Adds a unique identifier
----------------- ------------------------------------------------------------
request Logging of the received request
request.base_info add request host,ip,url,method
request.header add request header
request.body add request body
----------------- ------------------------------------------------------------
breadcrumbs What breadcrumbs do you need to collect
breadcrumbs.auth auth info
breadcrumbs.sql List of sql queries
breadcrumbs.route route info (name,action)

You can also get all harvested breadcrumbs using the get_breadcrumbs() method.

Related Packages

edujugon/laravel-log

Simple API to write logs for Laravel.

11,018 19
fryiee/custom_log

A Custom Log class built on Monolog's Logger.

73 0
itelmenko/laravel-mysql-logger

Laravel MySQL driver for Monolog

157,235 21
ebethus/laravel-mysql-log-driver

Laravel 10+ MySQL driver for Monolog

3,967 0
mobly/logger-laravel

Laravel service provider for the Mobly Logger package

702 0

Version History

Version Released PHP Laravel License
1.1 ^7.2 || ^8.0 ^v9.0 MIT
1.0.4 ^7.2 || ^8.0 ^v8.0 MIT
1.0.3 ^7.2 || ^8.0 ^v8.0 MIT
1.0.2 ^7.2 || ^8.0 ^v8.0 MIT
1.0.1 ^7.2 || ^8.0 ^v8.0 MIT