New

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

brackets/advanced-logger

Advanced logger
260,917 1
Install
composer require brackets/advanced-logger
Latest Version:v3.1.0
PHP:^8.0|^8.1
Laravel:9 · 10
Older releases:5 – 8
License:MIT
Last Updated:Oct 30, 2023
Links: GitHub  ·  Packagist
Maintainer: brackets

Advanced Logger

Advanced logger is a laravel package used to automatically log every request made to you laravel application. Each request is also identified by hash, which can be used in standard log to identify the request.

This package has been inspired by package https://github.com/andersao/laravel-request-logger from Anderson Andrade.

Installation

Composer

Run composer require brackets/advanced-logger in your terminal.

Laravel

This package is for Laravel 5.5, 5.6 and 5.7, so it has auto discovery.

To publish config file, run

php artisan vendor:publish --provider="Brackets\AdvancedLogger\AdvancedLoggerServiceProvider"

Configuration

All options are described in config/advanced-logger.php.

Using request hash in standard log file in Laravel 5.7

If you would like to have request identifier in you standard log, to match log events with request you could add to config/logging.php

'tap' => [Brackets\AdvancedLogger\LogCustomizers\HashLogCustomizer::class],

to daily channel. The resulted code should looks like

    'channels' => [
        ...

        'daily' => [
            'driver' => 'daily',
            'path' => storage_path('logs/laravel.log'),
            'level' => 'debug',
            'days' => 14,
            'tap' => [Brackets\AdvancedLogger\LogCustomizers\HashLogCustomizer::class],
        ],

        ...
    ],

This log modifier can be used also in other channels, however it uses extended LineFormatter.

Related Packages

betterde/logger

Elasticsearch logger handler

32,983 30
johnny/logger

The laravel log

1,726 1
teamofmalaysia/logger

The laravel log

7 0
ucan-lab/laravel-blink-logger

Comprehensive Logging Tool for Laravel.

13,677 12

Version History

Version Released PHP Laravel License
v3.1.0 ^8.0|^8.1 ^9.0|^10.0 MIT
3.0.0 ^8.0.2 ^9.0 MIT
2.3.0 ^7.2.5|^7.3.0|^8.0 ^6.0|^7.0|^8.0 MIT
2.2.0 ^7.2.5|^7.3.0 ^6.0|^7.0|^8.0 MIT
v2.1.0 ^7.2.5 ^6.0|^7.0 MIT