Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brackets-by-triad/advanced-logger
Advanced logger for Laravel
https://github.com/brackets-by-triad/advanced-logger
Last synced: about 1 month ago
JSON representation
Advanced logger for Laravel
- Host: GitHub
- URL: https://github.com/brackets-by-triad/advanced-logger
- Owner: BRACKETS-by-TRIAD
- Created: 2019-02-05T16:18:02.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-10-30T11:54:44.000Z (about 1 year ago)
- Last Synced: 2024-09-20T04:19:27.427Z (3 months ago)
- Language: PHP
- Size: 44.9 KB
- Stars: 1
- Watchers: 2
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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
```shell
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`
```php
'tap' => [Brackets\AdvancedLogger\LogCustomizers\HashLogCustomizer::class],
```to `daily` channel. The resulted code should looks like
```php
'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`.