Skip to content
Make debugging easier by adding more data to your laravel logs (Laravel 5.6 to Laravel 5.8)
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config Add "password_confirmation" to list of ignored input fields Oct 27, 2018
src Publish only if request is from console Oct 29, 2018
tests Add more tests Dec 17, 2018
.gitignore
.styleci.yml
.travis.yml
CHANGELOG.md Updates for Laravel 5.8 Mar 1, 2019
LICENSE
README.md
composer.json Updates for Laravel 5.8 Mar 1, 2019
phpunit.xml Add more tests and configure Travis CI Dec 17, 2018

README.md

Latest Stable Version Total Downloads License StyleCI Build Status

Laravel Log Enhancer (Laravel 5.6 to Laravel 5.8)

Laravel's logging system helps a lot for storing data as well as while troubleshooting some hidden bugs. The data related to the exception automatically gets logged whenever something goes wrong.

Sometimes, we need more than just stack trace to debug the issue easily. The things like request URL, request input data, session data, etc. help us hunt down the exact cause quickly. That's what this plug-and-play Laravel package does for you :)

Note: For Laravel 5.5, you may use Slack Error Notifier package.

Requirements

  • PHP 7.1.3+
  • Laravel 5.6+

Installation

  1. Install the package by running this command in your terminal/cmd:
composer require freshbitsweb/laravel-log-enhancer
  1. Add this package's LogEnhancer class to the tap option of your log channel in config/logging.php:
'production_stack' => [
    'driver' => 'stack',
    'tap' => [Freshbitsweb\LaravelLogEnhancer\LogEnhancer::class],
    'channels' => ['daily', 'slack'],
],

Optionally, you can import config file by running this command in your terminal/cmd:

php artisan vendor:publish --tag=laravel-log-enhancer-config

It has following configuration settings:

  • (bool) log_request_details => Set to true if you wish to log request data. Reference

  • (bool) log_input_data => Set to true if you wish to log user input data

  • (bool) log_request_headers => Set to true if you wish to log request headers

  • (bool) log_session_data => Set to true if you wish to log session data

  • (bool) log_memory_usage => Set to true if you wish to log memory usage Reference

  • (bool) log_git_data => Set to true if you wish to log git branch and commit details Reference

  • (array) ignore_input_fields => If input data is being sent, you can specify the inputs from the user that should not be logged. for example, password,cc number, etc.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE file for details

Special Thanks to

You can’t perform that action at this time.